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 trialMalorie Souser
551 PointsTrouble with float element in the in "Styling Web Pages and Navigation" Course
Hi Everyone. I'm new to coding and recently started the HTML & CSS track. In Stage 6, the course titled "Styling Web Pages and Navigation", I've run into a snag....
I cant seem to make the float element work. The task call for creating an "id" (labeled "gallery") tag for an "ul" in the html, then in the css file, modifying the tag as follows:
/#gallery { margin: 0; padding: 0; list-style: none; }/
/#gallery li { float: left; width:: 45%; margin: 2.5%; background-color: #f5f5f5; color: #bdc3c7; }/
All of the elements are taking effect except for the float, width, and margin elements for #gallery li.
I've checked and re-checked the code and nothing seems out of place, but I must be doing something wrong. Any help would be greatly appreciated!
3 Answers
Silvia Balu
8,963 PointsIn #gallery li you have 2 colons after width: "width:: 45%" instead of one.
Brandan Booth
9,321 Pointscan we see your markup
Malorie Souser
551 PointsThank you so much Brandan and Silvia. Removing that extra colon fixed the problem. Cheers!
Brandan Booth
9,321 PointsBrandan Booth
9,321 PointsGood call did not even see that