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
Dana Palazzo
2,496 PointsWhy has my header gone away?
The header of my webpage has disappeared. If i minimize the screen to the size of a mobile device, it pops back up. But the green header has disappeared in regular desktop view along with everything in it. If I highlight the page, I can see it there, but it's all out of whack! Please help!
5 Answers
Matthew Rigdon
8,223 PointsI would check your code. Perhaps look at your responsive.css and check the 660px portion. If your header is fine on smaller screens, then something is off when it tries to convert it to a larger screen size.
Dana Palazzo
2,496 PointsMatthew,
Thanks for the suggestion. Here's my code, if you don't mind taking a look to see if anything sticks out to you.
@media screen and (min-width: 480px) {
/********************* Two Column Layout *********************/
#primary { width: 50%; float: left; } #secondary { width: 40%; float: right; }
/*********************
Portfolio Page
*********************/
#gallery li { width: 28.3333; }
#gallery li:nth-child(4n) { clear: left; }
/*********************
About Page
*********************/
.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.5m; }
h2 { font-size: 0.825em; margin-bottom: 20px }
header { border-bottom: 5px solid #599868; margin-bottom: 60px; } }
Matthew Rigdon
8,223 PointsThe only mistake I notice is under your 480px where you are missing a % sign:
#gallery li {
width: 28.3333%;
}
I can't imagine that will fix the error, but you never know. Let me know.
Dana Palazzo
2,496 PointsThanks for catching that. Unfortunately, it's still not working. Thanks for trying!
Sally Gradle
24,694 PointsDana,
I think you have some mismatched curly braces in there, too. Check you About Page and Header sections. Also, try to follow the indentation conventions. It will make your coding life much easier in the long run.
@media screen and (min-width: 480px) {
/********************* Two Column Layout *********************/
#primary { width: 50%; float: left; }
#secondary { width: 40%; float: right; }
/*********************
Portfolio Page
*********************/
#gallery li { width: 28.3333; }
#gallery li:nth-child(4n) { clear: left; }
/*********************
About Page
*********************/
.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.5m; }
h2 { font-size: 0.825em; margin-bottom: 20px }
header { border-bottom: 5px solid #599868; margin-bottom: 60px; } }
Dana Palazzo
2,496 PointsSally,
Thanks for the help! I'll check it out!