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 trialHaven Hottel
2,911 PointsI cannot get my images to float into 2 columns. Please advise. My code is found here: https://w.trhou.se/cywxi538ij
HTML: <section> <ul id="gallery"> <l1> <a href=img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </l1> <l1> <a href=img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a> </l1> <l1> <a href=img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>Trying to create an 80s style of glows.</p> </a> </l1> <l1> <a href=img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>Drips created using Photoshop brushes.</p> </a> </l1> <l1> <a href=img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>Creating shapes using repetition.</p> </a> </l1> </ul> </section>
CSS:
img { max-width: 100%; }
/********************** PAGE PORTFOLIO **********************/
gallery {
margin: 0; padding: 0; list-style: none; }
gallery li {
float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #bdc3c7; }
3 Answers
Melisa Hamilton
11,729 PointsIt looks like your list elements are not labeled correctly. Try this:
<li>
<a href=img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
Haven Hottel
2,911 PointsThank you. I will try.
Melisa Hamilton
11,729 PointsYour welcome. Let me know if that didn't work. :)
Haven Hottel
2,911 PointsI had a strange character for my li items. This solution solved it. Thank you again for your assistance.
Melisa Hamilton
11,729 PointsYep! Glad it worked for you!
Sergey Podgornyy
20,660 PointsSergey Podgornyy
20,660 PointsPlease use Markdown Cheatsheet next time to stylize your code