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.

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

gallery doesnt divide into collums

i tried everything. my code (css) is:

gallery li {

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

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

We're going to need to see your workspace with all of your code and file structure. The easiest way to accomplish this is to link us a snapshot of your workspace. In your workspace you'll find a camera icon on the upper right-hand side. Use that to make a snapshot then open the link. Copy the link and paste it here so that we can look at the entire thing. Chances are good that the problem is elsewhere in your code.

3 Answers

how?

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I'm sorry. Which part of my instructions were unclear? Are you not finding the camera icon?

Suzanne Dondero
Suzanne Dondero
2,170 Points

Hi, I have the same issue with the gallery not splitting up into 2 columns, instead my footer is up at the top in what looks like it should be the second column.

Here is my snapshot: https://w.trhou.se/p7xqkh6y43

Suzanne Dondero
Suzanne Dondero
2,170 Points

Well, I figured out part of it at least.

I had

gallery {} instead of #gallery li {}, now there are two columns, but my footer is still in an odd place (next to the 12 as if it is a part of the gallery instead of at the bottom of the page)

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Suzanne Dondero Yup was just about to post the answer about the li. Well done on fixing that part yourself!

The footer is appearing at an odd place because it too is floating upwards to fill the empty space. You can fix this by going into the main.css and adding a line at the top of your footer selector.

footer {
  clear: both;
  font-size: 0.75em;
  text-align: center;
  padding-top: 50px;
  color: #ccc;
}

This will tell it to clear the floats. Later on down the line you'll learn about other "clear-fixes" in CSS.

Suzanne Dondero
Suzanne Dondero
2,170 Points

Thanks Jennifer, I realized that I should have waited until the end of the video to mention the footer floating. That was resolved by the end :-)

Thanks again!