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

Jacob Tennyson
Jacob Tennyson
6,240 Points

Stage 8: Adjust profile page and header....

On the moblie view in my about section my profile picture doesnt want to center and remains to the left. Ive gone over the code a few times and cant seem to find the problem...

Can you show us your code? :D

Jacob Tennyson
Jacob Tennyson
6,240 Points

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

}

/******************************** TWO COLUM LAYOUT **********************************/

primary{

width:50%; float:left; }

secondary{

width:40%; float:right; }

/******************************** 3 x 5 = 15 100% - 15% = 85% 85% / 3 = 28.33333 **********************************/

/******************************** Page: Portfolio **********************************/

gallery li{

width:28.3333%; }

gallery li:nth-child(4n){

clear:left; }

/******************************** 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%; width:45%; }

}

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi Jacob

There's a "d" character messing up your @media query declaration. Try removing that but it's difficult to see the rest without proper code formatting.

Have a go at formatting your code using the Markdown Cheatsheet as a guide and maybe we can keep debugging your code in this thread till we find the issue. :-)

Jacob Tennyson
Jacob Tennyson
6,240 Points

hmm. i deleted the "d" but its still not changing. Maybe its in the html?

2 Answers

Khaleel Hamid
Khaleel Hamid
5,258 Points

"d@media screen and (min-width:480px)"

There is a d before the @ which isn't need.

See if this fixes it

@media screen and (min-width:480px)

Hi Jacob,

I can see that you have said the d has already been removed so, if it isn't that, you look to be closing the media query before the code starts, e.g.:

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

}

.style-is-currently-here {
background-color: red;
}

when it should look something like:

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

.style-goes-here {
background-color: red;
}

}

Also, if this is supposed to target the mobile only, it should use max-width instead:

@media screen and (max-width:480px) {

Apologies if I'm misunderstanding but hope that helps

-Rich