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

CSS How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

Header items appear in 2 columns @min-width of 660in firefox but not chrome. Why? How 2 fix?

For example if the name of the designer is Bob Dingle, Bob would appear on top of dingle and then designer would appear under that. On the right side the nav element contact is sliding into a second row under index and about when the screen width is >480px and <~520. This dosen't happen in chrome.

Edit: I copied the code from the downloadable CSS file and it worked as it does in the video. I can't figure out the difference. Anyone know why this happened? Here is my code:

@media screen and (min-width: 480px) {

/**************************
    TWO COLUMN LAYOUT
**************************/
#primary {
    width: 50%;
    float: left;
}

#secondary {
    width: 40%;
    float: right;
}

}

/**************************
    PAGE: PORTFOLIO
**************************/

#gallery li {
    width: 28.33333%;
}

#gallery li:nth-child(4n) {
    clear: left;
}



/**************************
    PAGE: ABOUT
**************************/
.profile-photo{
    float: left;
    margin: 0 5% 80px 0;
}

@media screen and (min-width: 660px) {

nav {
    background: none;
    float: right;
    font-size: 1.25em;
    margin-right: 5%;
    text-align: right;
    width: 45%;
}

#logo {
    float: left;
    margin-left: 5%;
    text-align: left;
    width:45;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 0.825em;
    margin-bottom: 20px;
}

header {
    border-bottom: 5px: solid #599a68;
    margin-bottom: 60px;
}

}

2 Answers

I'm not sure if this answers your question, but I noticed a few other things in your code:

Under #logo, there should be a % after the 45.

#logo {
    float: left;
    margin-left: 5%;
    text-align: left;
    width:45%;

In the header, there is an extra colon after the 5px. It should read like this -

header {
    border-bottom: 5px solid #599a68;
    margin-bottom: 60px;

Under #gallery, I have nth-child(3n+1) instead of nth-child(4n). 3n+1 isn't the same as 4n.

#gallery li:nth-child(3n+1) {
    clear: left;
}

Hope this helps!

Hernan Martin Demczuk
Hernan Martin Demczuk
1,264 Points

What Sarah Hoopes says it's true but in case it didn't solve your problem you can try changing the length of the name for a shorter one or its fonts size. Also you can reduce the margins so the items won't appear in two differents lines.

Couldn't have been the length of the name b/c it worked when I cut and pasted the code straight from the download but still using the same name. I think perhaps there were some typos I missed as Sarah pointed out that messed up the formatting.

Couldn't have been the length of the name b/c it worked when I cut and pasted the code straight from the download but still using the same name. I think perhaps there were some typos I missed as Sarah pointed out that messed up the formatting.