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 trialnathanielcusano
9,808 Pointsmy css is out of order and page is displaying wrong?
need to see main.css code in correct order
Cheo R
37,150 PointsYou can try formatting your code using three backticks, follwed by css, your code, and ending with three more backticks. For example, three backticks, css, my code of .thisClass { color: red; }, followed by three more backticks looks like this:
.thisClass {
color: red;
}
1 Answer
Trent Christofferson
18,846 PointsIf wrapper and logo are classes they need to be .wrapper and .logo in your css if they are id's you need to have them as #logo and #wrapper with nothing in front of the name it just thinks it is an element which it is not.
nathanielcusano
9,808 PointsSorry that's not the issue. When I copied and pasted the code for some reason the pound sign was not visible.
nathanielcusano
9,808 Pointsa { text-decoration: none; }
wrapper {
max-width: 940px; margin: 0 auto; padding: 0 5%;
}
a { color: #6ab47b; }
header { background-color: #6ab47b; border-color: #599a68;
}
h1, h2 { color: #fff; } h1 { font-family: 'Changa One', gothic one; margin: 15px 0; font-size: 1.75em; font-weight:normal; line-height: 0.8em; } h2 {
font-size: 0.75em; margin: -.5px 0 0; font-weight:normal;
}
nav { background: #599a68; }
nav a, nav a:visited { color: #fff;
}
nav a.selected, nav a:hover { color: #32673f; /The selected and hover color is the same/ } /* Site Body */ body { background-color: white; color: #999; }
body { font-family: 'Gothic One'; }
img { max-width: 100; }
gallery{
margin: 0; padding: 0; list-style: none; }
gallery li {
float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #bdc37c;
}
logo {
text-align: center; margin: 0; }
nathanielcusano
9,808 PointsReposted it. I can't paste the pound sign though
nathanielcusano
9,808 Pointsnathanielcusano
9,808 Pointsa { text-decoration: none; }
wrapper {
max-width: 940px; margin: 0 auto; padding: 0 5%;
}
logo {
text-align: center; margin: 0; }
a { color: #6ab47b; }
header { background-color: #6ab47b; border-color: #599a68;
}
h1, h2 { color: #fff; } h1 { font-family: 'Changa One', gothic one; margin: 15px 0; font-size: 1.75em; font-weight:normal; line-height: 0.8em; } h2 {
font-size: 0.75em; margin: -.5px 0 0; font-weight:normal;
}
nav { background: #599a68; }
nav a, nav a:visited { color: #fff;
}
nav a.selected, nav a:hover { color: #32673f; /The selected and hover color is the same/ } /* Site Body */ body { background-color: white; color: #999; }
body { font-family: 'Gothic One'; }
img { max-width: 100; }
gallery{
margin: 0; padding: 0; list-style: none; }
gallery li {
float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #bdc37c;
}
My images don't resize as 45% was supposed to cause either