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 Styling Web Pages and Navigation Build Navigation with Unordered Lists

Caspar Claessen
Caspar Claessen
9,060 Points

Header floats to the left and does not fill my entire top of the page.

After the first step, my header literally floats to the left and the first picture gets beside it. When I remove the float property, it does fill up the entire top of the page. What am I doing wrong?

https://w.trhou.se/43c4d17zl5

4 Answers

anil rahman
anil rahman
7,786 Points

That will fix it

header {
  float: left;
  margin: 0 0 30px 0;
  padding: 5px 0 0 0;
  /*max-width: 100%;*/
  width: 100%;
}
anil rahman
anil rahman
7,786 Points

Also add this to fix your li navigation items centring issue.

nav ul {
  padding-left: 0; 
}
Caspar Claessen
Caspar Claessen
9,060 Points

It does not work... My images float right of my header. My header stays the same size.

Caspar Claessen
Caspar Claessen
9,060 Points

On another browser (Internet explorer) it's fixed now. Thankyou.