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 trialSam Purcell
2,121 PointsWhy do we float the header left?
I understand the concept of a float, but I am not really understanding what the purpose of using a float: left for the entire header, what exactly is that accomplishing?
When I remove it from the code it doesn't seem to have an effect.
Thanks for your help!
2 Answers
queenyq
12,043 PointsWell if you wanted to add something else to the header like a piece of text for the location and phone number. You can float it to the right. Allowing for both pieces of information to be aligned in the header. Otherwise, the new text would appear most likely underneath the current header if the size was bigger then the header's width dimensions.
Satnam Singh
7,194 PointsWell the best solution is to not use those float codes and other properties, this code will fix all those issues with just 1 property, here's the code you can try instead of that float and other codes :
header {
overflow: hidden;
}