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
How to create HTML full header?
Hi I wanted to have on my site a header but I wanted it to stretch out completely from the corner of one page to the other. I only needed width not the height.
I was thinking
div{
Border:1px; width:100% }
Something like that but It wasn't really working. What can I do also to mention I'm a beginner so I verily started TTH last night but HTML last weeks
2 Answers
Nick Stellato
Front End Web Development Techdegree Student 33,994 Points@Jonathan The short answer is is that your style sheet should read as:
div {
border: 1px solid black;
}
Inside the div in the index.html document, there needs to be some sort of content in the div in order to render the border on the page.
As you will learn, each browser has a set of default styles. In order to reset the defaults, you need to link a reset style sheet to your index.html document. I would suggest using normalize.css.
Hope this helped.
Nick
Kris Jolls
5,157 PointsYou are correct though about making it width: 100%; You will need to create another div inside that one to contain the actual header content and keep it centered with