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 trial

HTML How to Make a Website Styling Web Pages and Navigation Style the Portfolio

Mary-ashley Holtz
Mary-ashley Holtz
2,398 Points

2 Column Error

I can not seem to get my website to sit in two columns. I assume I am missing some type of code. Can anyone weigh in?

HTMl: <header> <a href="index.html" id="logo"> <h1>Mary-ashley Holtz</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <div id="wrapper"> <section> <ul id="gallery"> <li> <a href="img/number1.jpg"> <img src="img/number1.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li> <li> <a href="img/number2.jpg"> <img src="img/number2.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a> </li>

CSS: /***************************************** Page: Portfolio ******************************************/

gallery {

margin:0; padding: 0; list-style: none; }

gallery {

float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #bdc3c7;

Thanks! Mash

1 Answer

Hi Mary-ashley,

In your 2nd selector you've targeted the gallery again but it's the li's that you want to target so that they'll have a 45% width.

#gallery li

Mary-ashley Holtz
Mary-ashley Holtz
2,398 Points

Thanks Jason, I appreciate it! I now have 2 columns.