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 trialWilliam Hurst
25,074 PointsWhere is the explicit value for the header element?
Nick states states that when float is added to the header, it no longer has a explicit value. Not sure if I have looked past it, but I can't see an explicit value for the header. Any help thanks.
2 Answers
Steven Parker
231,248 PointsI think what he means is that being a block element, by default it gets the full width of it's container. It's not actually "explicit" in the sense of having a width property in a CSS rule.
Floating causes it to loose this "explicit width" and allow other elements to flow around it.
Tom Checkley
25,165 PointsA floated element doesn't have a an explicit width, so he sets the width of the header to 100% to make it stretch the full width of the screen. Otherwise it would only take up as much space as the elements inside it required.