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

Mark Gelfond
Mark Gelfond
1,757 Points

Resizing the page doesn't change 2 column layout to 1 column.

Seems to me I'm following Nick perfectly, yet I don't understand where the problem is.

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

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

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

It wouldn't do it automatically, not with an element that it's been floated out of normal document flow.

You need a media query or two to change the way the element is layed out on the page so they're not floated so they appear as columns but rather that they're on top of each other.

@media screen (max-width: 480) {
   .profile-photo {
 display: block;
width: 80%
  margin: 0 5% 80px 0;
}
}
Mark Gelfond
Mark Gelfond
1,757 Points

Thanks, that helped!

Tobi Ogunnaike
Tobi Ogunnaike
2,242 Points

Thanks, that worked for me too.

But Nick had already written

.profile-photo{
  display:block;
}

in main.css.

So why do we need to rewrite that declaration?

Thanks!