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

HELP! I have tried to do several of the steps, as Nick does, but upon doing so I' am not receiving the same results

I tried to make my about page 2 columns, as shown in the video, upon doing so, I resize my screen and nothing has changed. This has also happened in the previous section when adding media queries. I would like to address the issues before moving forward so I'm not on the last lesson or challenge and do not understand my mistakes

Alexander Daniels
Alexander Daniels
3,307 Points

Post your code in the area of your problem, please.

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

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

primary {

width: 50%; float: left; }

secondary {

width: 40%; float: right; }

}

/************************ 3 * 5 = 15 100% - 15% = 85% 85 / 3 = 28.3333333333 ************************/

/************************ 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) {

}

sorry alexander im assuming you didn't mean literally lol I don't know how more precise I can get. I'm having problems in css, with using media queries. Isn't that enough info to receive help? Is there a way to show exactly what's on my workspace and share it with you?

Hi Marcus,

Were you able to solve this? If not, your workspace has an icon called 'snapshot' (it's a picture of a camera). Once you have a snapshot of your workspace, you can share the link here on the forum and we can see all of your code and more easily find the problem.

5 Answers

Alexander Daniels
Alexander Daniels
3,307 Points

You are missing a closing curly brace after the .profile-photo element

Alexander Daniels
Alexander Daniels
3,307 Points

The closing curly brace goes to the top with

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

but needs to cover the whole section down to profile-photo

EDIT:

I noticed you DO have a closing curly, but it is in the wrong place. Right below .secondary you have the closing curly in the wrong place and is not including the rest of your code.

Matthew Byrne
Matthew Byrne
17,558 Points

Hey Marcus,

Do you have the CSS selectors in there? If you copy/pasted your code, it looks like they're missing. For classes you need a period before the name, ie .primary and .secondary. For id it's a "#".

Hope that helps.

Alexander Daniels
Alexander Daniels
3,307 Points

The forum here bolds words with the # tag automatically when posting.

one more thing http://prntscr.com/7wq0fl why doesn't my "profile-photo"= "profilbild" go in the middle now ? i have coded it !

It's hard to know what's really going on without also seeing the HTML. Your CSS rule targets an upper-case '.Profilbild', so it would fail if the HTML tag with a class attribute contains, for example, 'profilbild'. Case matters.

If my suggestion doesn't help, please consider posting a new forum question - showing both HTML and CSS code, so that others will be more likely to see it and help you faster.

Cheers

here is my snapshot work https://w.trhou.se/9odw22oidz

The reason is because responsive.css has a .Profilbild overriding the margin style declaration in main.css.

main.css
.Profilbild {
  display: block;
  max-width: 150px;
  margin: 0 auto 30px;
  border-radius: 100%;
}
responsive.css
/* remove this style rule */
.Profilbild {
  display:block;
  margin: 0 5% 80px 0;
}