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 Responsive Web Design and Testing Adjust the Profile Page and Header

Michael Carson
Michael Carson
933 Points

nav header is not changing background or aligning to the right

@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.3333%;
}

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

    /************************
    PAGE: ABOUT
    ************************/

.profile-photo {
    float: left;
    margin: 0 15% 80px 0;
    }
}

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

   /************************
    HEADER
    ************************/  

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

fixed code formatting

5 Answers

Can you post a snapshot of your workspace?

From what I can tell here, you have an extra closing curly brace on your 480px media query.

The one right before the "portfolio" comment seems to be extra.

changed from comment to answer

You must put your media queries at the end of the stylesheet. This is required :+1:

I hope this helps. :grin:

~Alex

Michael Carson
Michael Carson
933 Points

Hey Alex, I've tried this and there is still no difference, i'm really confused.

/************************
TWO COLUMN LAYOUT
************************/

#primary {
    width: 50%;
    float: left;
}

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

}

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

gallery li {

width: 28.3333%;

}

gallery li:nth-child(4n) {

clear:left;

}

/************************
PAGE: ABOUT
************************/

.profile-photo { float: left; margin: 0 15% 80px 0; } }

/************************ HEADER ************************/

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

}

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

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

Michael Carson
Michael Carson
933 Points

Thank you Jason, i missed that completely!

Is it working now? I'll change my comment to an answer if that's what it was.

Michael Carson
Michael Carson
933 Points

It's all working now, thank you so much. I was losing hope for a minute haha