+ 2
CSS HEADER POSITION CAUSING PROBLEM
Whenever I change the header position to fixed, as it removes header from normal flow of the page, it makes the content immediately below header, disappear behind it. How do you solve this problem??? here is codepen link.. though I have it on sololearn as well but for some weird reason, sololearn doesn't load that page on mobile app. https://codepen.io/croy4744/full/xxEVeej (i) header becomes problematic when its position is set to fixed (ii) responsive web design suggestions (iii) any other suggestions you would like to give.
11 Answers
+ 3
I do not understand you, please tell us more
+ 1
Can you please show your attempt?
I think that depends on contentâs position, which can to be setted as relative to its container.
+ 1
Consider this:
https://code.sololearn.com/WzNJ8BKpQgTa/?ref=app
+ 1
Or you could use 'padding-top:...' that should work as well. I'm sure there are other tricks to accomplish same result. Depends on what exactly you trying to do.
+ 1
Artur bro, thanks for your response. Can you have a look at this and then give your valuable comments.
https://codepen.io/croy4744/full/xxEVeej
+ 1
CHANDAN ROY I can't open your code. SL reloads for some reason.
+ 1
Artur here is codepen link https://codepen.io/croy4744/full/xxEVeej
+ 1
Add position property in parent element
Then your problem will be solve
+ 1
In your CSS delete the header position.
#header {
position: fixed;
}
0
You can use 'position: relative' on element next to fixed one, and then adjust 'top' property.
0
So you do not want the header to remain at the top?