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

HTML How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

Kristopher Reynolds
Kristopher Reynolds
1,520 Points

My Navigation and Heading are all off on this lesson..

When I add these new break points for my Nav and Heading. I can't even describe how messed up it gets hah. My navigation loses its background ( as it should ) and float to the right correctly. Except the background is white and you can't read the navigation unless you hover over it. Once I add the heading the page kind of explodes lol. This is my code currently with all its flaw's.

@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.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) {


 /*********************** 
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;
   margin: 45%;
  }

  h1 {
   font-size: 2.5em; 
  }  


}
Hadi Khalili
Hadi Khalili
7,969 Points

is PAGE:PORTFOLIO and PAGE:ABOUT part of the first media query? if yes then they are outside the the query.

Kristopher Reynolds
Kristopher Reynolds
1,520 Points

Oh goodness lol. Yeah you're right, it is supposed to be inside the media query. Oddly enough it didn't fix any of my issues. Thank you though. The issues came in on the second media query, only then did my website start to get displaced.

1 Answer

Kristopher,

I agree with Hadil, and based on what I have, it also looks like you are missing some styles after the h1 that handles the Header section of your sheet. In my stylesheet I also have some styles associated with the h2 and header elements.