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 trialEmils Bisenieks
751 Pointswhy main.CSS #gallery wount work?
i think everything is ok, but it wount work like in the video
index.html
<div class="wrapper">
<section>
<ul id="gallery">
<li>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Eksperments ar bildēm un tekstu</p>
</a>
</li>
<li>
main.css
/********** PAGE: PORTFOLIO **********/
gallery {
margin: 0; padding: 0; list-style: none; } /before gallery ther is #/
gallery li {
float: left;
list-style-type: none;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;
} /before gallery ther is #/
3 Answers
Steven Parker
231,210 PointsYour HTML seems to be missing the closing tags for the UL and SECTION elements.
Grace Kelly
33,990 PointsI think the issue is that you forget the hash '#' before the gallery ids in your css :
#gallery { /* Add '#' to gallery id */
margin: 0;
padding: 0;
list-style: none;
}
#gallery li { /* Add '#' to gallery id */
float: left;
list-style-type: none;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;
}
Hope that helps!!
Emils Bisenieks
751 PointsThanks, but i all ready done that!
Emils Bisenieks
751 PointsThanks for answers, now it works perfect!
Orion Adler
1,497 Pointshow did u solve it?
Emils Bisenieks
751 PointsI knew that i write the code right, so i restart my browser and it worked!
Emils Bisenieks
751 PointsEmils Bisenieks
751 PointsNo, i think they are in right places!
<div class="wrapper"> <section> <ul id="gallery"> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Eksperments ar bildēm un tekstu</p> </a>
</li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Kautkāda bilde</p> </a>
</li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Tas neesmu es</p> </a>
</li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Opā lilā</p> </a>
</li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Džiranimo</p> </a>
</li> </ul> </section>