-4

I have no idea to create a fixed header as we commonly see in the http://facebook.com ... the blue bar which is in the top of the website and in all the page. Please help me with it.

  • 1
    Possible duplicate of [position fixed header in html](http://stackoverflow.com/questions/10975268/position-fixed-header-in-html) – chimos Nov 26 '15 at 08:57

3 Answers3

2

In your css add this in your header element:

position: fixed;
Federico Govoni
  • 148
  • 4
  • 9
1
<div style="position:fixed"></div>

This places a element on a fixed position on the screen

StijnvanGaal
  • 441
  • 3
  • 17
0

You need to use position fixed which makes sure that the header always stay at the place you said it should you can read about position fixed here http://www.w3schools.com/cssref/pr_class_position.asp

Anoxy
  • 873
  • 7
  • 17