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

Jamaal Todd
Jamaal Todd
5,689 Points

Profile picture / About text

hi,

This is a problem with the Profile picture and the text after creating a two column layout for bigger screen.

When ever I decrease the size of the page, the profile does not stack on top of the text. It remains floated to the left and the text stays on the right, and then wraps around as I make the page smaller.

Help please :)

Can you copy and paste your code here so we can see what you're talking about. Please wrap the code with three ` marks as well so that it will render as code on the screen. Thanks!

Jamaal Todd
Jamaal Todd
5,689 Points

This is the Responsive.css file I have. Thanks ''' @media screen and (min-width: 480px) {

/********************************* TWO COLUMN LAYOUT **********************************/

#primary {
    width: 50%;
    float: left;
}

#secondary {
    width: 40%;
    float: right;
}

}

/********************************* PAGE: PORTFOLIO **********************************/

gallery li {

width: 28.3333%

}

gallery li:nth-child(4n) {

clear: left;

}

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

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

@media screen and (min-width: 660px) {

/********************************* HEADER **********************************/

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

#logo {
    float: left;
    margin-left: 5%;
    text-align:left;
    width: 45%;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 0.825em;
    margin-bottom: 20px;
}

header {
    border-bottom: 5px solid #599168;
    margin-bottom: 60px;
}

} '''

Jamaal Todd
Jamaal Todd
5,689 Points

I think ive solved it.

I moved the closing curly bracket from ( @media rule (min-width: 480px) ) to just after the closing curly bracket on the .profile-photo ...

Refreshed and tried re-sizing the webpage, didnt work (windows 8.1 firefox), tried chrome and it worked, and tried my phone (safari - iphone 5s) and it worked aswell.

So maybe an issue with firefox?

Thanks for response tho Marcus Parsons :)

I'm glad you solved it, Jamaal! That is wonderful! I think the best problems I like having are the ones I solve myself haha Good luck and happy holidays! :)

3 Answers

I have been struggling over this for the past two days as well. My profile picture moved to the right of the entire page when I shrank the browser to a mobile view. IN FIREFOX! I copied the files to test it on my local machine and the same issue appeared. Larger views work fine.

The videos seem to run better in Firefox for me, so when I switched from Chrome is when things began to break. I'm glad the problem isn't unique.

Jamaal Todd
Jamaal Todd
5,689 Points

Hi Amy,

Sorry I struggled to understand if your still having problems? Or need help? :)

I was just chiming in because I had the same issue. I think it is fixed, but there are other things behaving strangely that I will post in a separate question.

Just saying that you were not the only one having the problem and agreeing that it might be an issue with Firefox.

Jamal -awesome solution, and it makes total sense.

Cheers.