Frage

Is there any way to make a section in html that would always be shown as "on top"? Kinda like a menu bar, just to give an idea of what would that mean, but applied to a whole section. In my particular case, I have a html divided mainly in two sections: the upper with a list, and this should be scrollable, and the lower one with a couple of buttons, but this one should always be seen by the user, because he/she might want to click one of the buttons without scrolling down(perhaps quite a lot) to get to the buttons.

War es hilfreich?

Lösung

You can use position: fixed to fix an element relative to the browser window. This would give you your desired effect.

Andere Tipps

you can try :

 postion:fixed;
 display: block; 
 top: 0px;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top