Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Layout Basics Positioning Page Content Fixed Positioning

I Fairly got a bad time positioning the header in the browser.

My website that am working on is having fairly bad time at positioning the header and the Navigations in my website, I Fixed the problem with the fixed positioning, What do i want right now is give my header the full with with no margins or paddings and does not follow the user when he scrolls more on the webpage. How I would do that?.

Do you have the code?

Yes, Here's the code: <head> <style> header{ width:100%; top:0; left:0; margin:0 auto; padding:0 auto; } </style> </head> <body> <header> <p>am a p tag</p> </header> </body> </html>

1 Answer

Sorry, I dont quite understand what you want?

Is it the P tag you want as the full width? width 100% will make it the full length, for example if you put a background-color on now it will be the full length