Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Aaron Vowles
6,376 Points[ANSWERED]. Float function now working
I'm on stage 6 - styling web pages. I'm typing all of the code which has worked fine until I have introduced 'float'. My webpage wont show two pages side-by-side as demonstrated?
Here's my CSS & HTML, any ideas?
HTML <ul> <li id="gallery"> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt="numbers"> <p>Experimentation with colour and texture.</p> </a> </li>
CSS
/******************************* PAGE PORTFOLIO ******************************/
gallery {
margin: 0;
padding: 0;
list-style: none;
}
gallery li {
float: left;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;
}
4 Answers

Aaron Vowles
6,376 PointsI had placed my 'id=gallery' within the li tag instead it should have been within the ul tag.
hop this helps

Gloria Dwomoh
13,104 PointsI don't see your HTML.

Aaron Vowles
6,376 Pointssorry fixed it!!! placed the gallery in the wrong section - should have been within <ul>.
Thanks anyway!

Gloria Dwomoh
13,104 PointsYou are welcome :)

Tom Page
1,283 PointsAaron. Im having the same problem. You said that the gallery was in the wrong section and that it should have been "within". What exactly did you mean? Did you move #gallery in your css file? If so, where to? Many Thanks!

Drake Myers
440 PointsI have the same question as Tom