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 trialMarcus McKenzie
505 PointsHELP! 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
Marcus McKenzie
505 Points@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) {
}
Marcus McKenzie
505 Pointssorry 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?
Robert Richey
Courses Plus Student 16,352 PointsHi 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
3,307 PointsYou are missing a closing curly brace after the .profile-photo element
Alexander Daniels
3,307 PointsThe 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
17,558 PointsHey 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
3,307 PointsThe forum here bolds words with the # tag automatically when posting.
Shpat Aslani
Courses Plus Student 509 Pointsone more thing http://prntscr.com/7wq0fl why doesn't my "profile-photo"= "profilbild" go in the middle now ? i have coded it !
Robert Richey
Courses Plus Student 16,352 PointsIt'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
Shpat Aslani
Courses Plus Student 509 Pointshere is my snapshot work https://w.trhou.se/9odw22oidz
Robert Richey
Courses Plus Student 16,352 PointsThe reason is because responsive.css
has a .Profilbild
overriding the margin style declaration in main.css
.
.Profilbild {
display: block;
max-width: 150px;
margin: 0 auto 30px;
border-radius: 100%;
}
/* remove this style rule */
.Profilbild {
display:block;
margin: 0 5% 80px 0;
}
Alexander Daniels
3,307 PointsAlexander Daniels
3,307 PointsPost your code in the area of your problem, please.