Link to home
Start Free TrialLog in
Avatar of Boopathy S
Boopathy SFlag for India

asked on

Header is not getting fixed position while scrolling

Here I have provided the link of Js fiddle https://jsfiddle.net/orfgrs23/8/

While scrolling the page, the header is also getting scrolling down. But I need header needs to be in fixed position. Please provide me suggestion on this.

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of Ayoub Rouzi
Ayoub Rouzi
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Boopathy S

ASKER

Hi Ayoub Rouzi. Thanks. I have edited in jsfiddle. Please see the link.

I have used the position

.content-header-row{
  position: fixed;
}

Open in new window


When I use the top: 0; in that. The first row is getting erased. Please see the link on question
Yes that is normal, you have to add an empty line or make a <br>
Hi, Thanks. I need to add empty line in css? If I add the empty line code as like below

.content-header-row{
  position: fixed;
    margin-top: -2em;
  display: block;
 
}

https://jsfiddle.net/orfgrs23/29/

It affecting the above line. Is that I used in correct way? Or I need to change something? Please advice
I think that the author used my solution, the last question is another one.