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 trialMark Gelfond
1,757 PointsResizing 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
Treehouse Moderator 91,253 PointsIt 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
1,757 PointsThanks, that helped!
Tobi Ogunnaike
2,242 PointsThanks, 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!