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 trialMichael Sothan
8,048 PointsCan't get responsive 2 column layout on About page using responsive.css
When I add the code
.profile-photo {
float: left;
margin: 0 5% 80px 0;
}
to the responsive.css page I don't see any effect on the webpage. It's only when I add this same code to the main.css page do I see a change. However, the text still does not move responsively.
Is the original code on the main.css page of
.profile-photo {
display: block;
max-width: 150px;
margin: 0 auto 30px;
border-radius: 100%;
}
somehow overriding the code on the responsive.css page?
1 Answer
Michael Sothan
8,048 PointsHi Meghan,
I'm pretty sure my media queries are correct. My code is:
@media screen and (min-width: 480px) {
at the top of the responsive.css page with my different CSS nested inside.
The profile photo doesn't float left, however when I expand the screen to its widest size on my Macbook the photo seems to move to the far left of the margin for the ul with the 3 nav elements (but not the extreme left).
When I place the same code:
.profile-photo { float: left; margin: 50px 5% 100px 0; } In my main.css file under the other CSS for the .profile-photo class, which is:
.profile-photo { display: block; max-width: 150px; margin: 0 auto 30px; border-radius: 100%; }
The photo indeed floats left. The text wraps to fit the screen width but it never changes position like in the video where the text goes from the right to being underneath the photo.
Any ideas?
Meghan Tucker
Front End Web Development Techdegree Graduate 33,189 PointsMeghan Tucker
Front End Web Development Techdegree Graduate 33,189 PointsAre you using media queries appropriately, and did you add your responsive.css file into your html file in the head of the document, underneath the link to your main.css file?