C.Ronaldo C.Ronaldo - 3 months ago 4
HTML Question

Keeping space after top gets fixed

I have created a function where menu gets fixed when I scroll down.
But when that happens, it takes a lot of space with it, as you can see in my demo:
https://jsfiddle.net/h65x3hyb/ all the text goes behind the fixed bar instead.

Is there a way to keep a little bit more space between

which gets fixed and


You must to play with the padding-top of the content when the top is fixed. So the whole solution is:

.top.fixed + .content {
    padding-top: 155px;

Your edited fiddle: