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
Gilson Siegel
4,527 PointsCannot find problem in code
Taking the first build a website lesson, using what appeared to be the exact code from each lesson, I have an anomalous result: a bar of blank space appearing above my top element on the contact page (mobile format), and the about page in other formats. Everything else works perfectly. The portfolio page works correctly, and all the html is copied and pasted directly form that. My assumption is that it's in the responsive css code, but I've been unable to find the issue. Any help would be greatly appreciated:
<css>
/*******************************************
MEDIA QUERIES
*******************************************/
@media screen and (min-width: 480px) {
/*******************************************
TWO COLUMN LAYOUT
*******************************************/
#primary {
width: 50%;
float: left;
}
#secondary {
width: 40%;
float: right;
}
/*******************************************
PAGE: PORTFOLIO
*******************************************/
#gallery li {
width: 28.33333333333%;
}
#gallery li:nth-child(4n) {
clear: left;
}
/*******************************************
PAGE: 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%;
text-align: right;
width: 45%;
}
#logo {
float: left;
margin-left: 5%;
text-align: left;
width: 45%;
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 0.825em;
margin-bottom: 20px;
}
header {
border-bottom: 5px solid #444;
margin-bottom: 60px;
}
}</css>
1 Answer
Kenneth Love
Treehouse Guest TeacherFixed your formatting for you (you used ''' instead of ```).
Are you actually using the <css> tags that you have in your example? If so, they should be <style> tags instead.
Gilson Siegel
4,527 PointsThanks for the formatting, and no, I wasn't really using those, they were just a failed attempt to get it to show up as code
Gilson Siegel
4,527 PointsGilson Siegel
4,527 PointsAnd apparently I can't figure out how to properly input code in the comment, either