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 trialYashvir Sangha
1,019 PointsI can't get the images to float.
img {
max-width: 100%;
}
/***************
Portfolio
***************/
#gallery {
margin: 0;
padding: 0;
list-style: none;
}
#gallery li {
float: left;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;
}
<ul id="gallery">
2 Answers
Griffin Byatt
8,903 PointsTo float an li element, make sure to display: block.
Yashvir Sangha
1,019 PointsI've fixed it now, it turned out to be a problem in my HTML code there I repeated the <ul>
element through out the list instead of just doing it once over all.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Yashvir,
What does it currently look like?
Can you post all the html for the "gallery"
ul
?