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

Kaysha George
Kaysha George
932 Points

On my about page-when I shrink the browser to mobile size, my profile picture and paragraphs do not align to one column.

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

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

This is what I have. it is located in the same position as he has done in the video. just above my media query for 660px but below all my css for 480px.

Can't seem to find a fix.

2 Answers

Kaysha George
Kaysha George
932 Points

Just needed to move the closing curly brace from my first media query to after this bit of code. Example:

@media screen and (480px) {

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

} <!-- <----------- That is the curly brace I was missing when this code wasn't working for me. -->

I had it sitting before my .profile-photo, so that it was excluded from my media query.... Doh

Russell Knight
Russell Knight
4,020 Points

Thanks that was driving me insane! Funnily enough I think by adding in all the extra comment headings it made it a bit more confusing :S

I had the same problem. Thank you.

huckleberry
huckleberry
14,636 Points

edited answer to include code formatting.

Glad you got it figured out

Cheers,

Huck - :sunglasses: