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
Richard Targett
4,960 PointsHow to create a static header
Im looking to create a static header, similar to facebook how it stays on the top - or maybe WIRED.COM where it changes a bit. But all the same, it stays on top. Stretching 100% of the page and being only about 100 pixels in height.
Where in treehouse would I goto to find out how to code this, as I am only a returning user and havent used tree in months
Thanks
2 Answers
Guil Hernandez
Treehouse TeacherHi Richard Targett,
This video from CSS Layout Basics will teach you how to create a fixed header. :)
Konrad Pilch
2,435 PointsCool! :D New content, yay :D i believe so.
Richard Targett
4,960 Pointshttps://jsfiddle.net/s60Lb014/
Thats mega slack, but its what I got so far. Can I get a nod in the right direction as to why its covering the nav
Jesus Mendoza
23,289 PointsJesus Mendoza
23,289 PointsHey Richard, create your header and instead adding absolute or relative position just add position: fixed;
Let me know if you need more help