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

Why is the responsive code not adjusting for my mobile view?

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

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

The code above is exactly the same as Nick's yet in the mobile view the changes remain. My profile pic does not move to the center and my header links stay to the right? Any ideas?

4 Answers

Hi Eric,

Do you have those styles inside the media queries in responsive.css? Post the css showing the media queries.

the .profile-photo styles should be in the 480px media query and the nav styles should be in the 660px media query.

Could you please post the link to the exercise? Are you using @media query in CSS?

Did you use ID or CLASS on your photo in the HTML? the "." is for class selector and "#" is for ID.

try this

#profile-photo  {
    float: left;
    margin: 0 5% 80px 0;
}

Good job guys!! I was outside my media query bracket! Thanks for all the quick responses!