- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I need to create sticky header (logo + text + hamburger) at mobile and tablet size screen:
https://codepen.io/mary_pieroszkiewicz/pen/mKJZRR
Thanks for help!
just add “display: inline;” or “display: contents;” to .container
hope it helps
I managed to do it …! I had to give the position rule: sticky in the header:
ok., it’s the same with position fixed (without content above header)
I have read on the web that position: sticky is better than position: fixed especially for mobile devices…
https://keithclark.co.uk/articles/fixed-content-with-position-sticky/
https://gedd.ski/post/position-sticky/
https://alligator.io/css/position-sticky/
ah ok, thanks for the hint :)
I have another problem for now with slider.
Due to position: sticky I had to suppress the slider position (I had a slider earlier in the header container) because of the position sticky I had to remove the slider container from the header container. On the desktop, I need change the display order of the slider items above and the navigation below