Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Grim Fandango
5,804 PointsNeed help with list items!
Hi,
I'm new here so not sure whether I can link to my Workspace, but here goes: https://teamtreehouse.com/workspaces/14751312#
Last night I noticed that my list items within the "gallery" id were not horizontally central on mobile devices (I was testing on iPhone 6 Plus). In my Responsive.css file I changed the margin from 2.5% to auto and this fixed it:
@media screen and (max-device-width: 479px) and (orientation: portrait)
gallery li {
float: left;
width: 100%;
margin: auto;
background-color: #f5f5f5;
color: #bdc3c7;
...however it introduced a new issue where there is no longer any space between the list items, so they are all vertically bunched together.
Any ideas? :)
Thanks
James
3 Answers
Jacob Mishkin
23,118 PointsI would look into giving your list items a top or bottom margin.
here is a great post on margins:
terrellharper
5,372 PointsI agree maybe give the items a margin-top of 10px or so. I hope this helps!
Grim Fandango
5,804 PointsThanks for your replies! I will have a play around tonight and see if I can nail it :)