I try to constantly float the menu bar at the top of the browser, so when they scroll down the page, the menu bar remains at the top.
How can i do this?
Hi,
You can do this using the CSS position property. For instance:
#menu { height: 50px; left: 0; position:fixed; top: 0; }
Literature:
The first thing I noticed is that it is effectively used on the Perldoc site. If you need to scroll, the #content_header element uses a combination of CSS and JS to keep the element visible on the page.
CSS position: fixed; , . , top/right/bottom/left, . z-index , "". z-index of 1 a z-index, 100.
position: fixed;
top/right/bottom/left
z-index
div.float { position: fixed; top: 10px; left: 25px; z-index: 9001; }
jsfiddle.net , . , , : http://jsfiddle.net/2rhrc/
Source: https://habr.com/ru/post/1764605/More articles:Необходимо удалить дубликаты из списка словарей и изменить данные для оставшегося дубликата (python) - pythonadding ShareKit to my project will not compile - 4,448 errors - objective-cMerging two assemblies at runtime - C # - reflectionHow can I use bulkuploader to populate a class using db.SelfReferenceProperty? - pythonNeed Help Creating a Datastore GAE Loader Class? - pythonPHP preg_replace making regex optional? - phpRestarting the modernizer after ajax - jqueryXNA, occlusion rejection and collision detection - c #How to handle HTML tags in java servlet program? - javaOpenGL ES 1.1 Error 0x0500 - opengl-esAll Articles