Similar Posts

Subscribe
Notify of
4 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
slaxxer
4 months ago

Personally, I would either access Grid or Flexbox for the layout, instead of absolutely positioning everything that also applies to responsiveness

Co1002
5 months ago

Good evening.

To always display this navigation above, you need to fix it. This works with css position: fixed; and top: 0; .

A good example of this can be found on the following page:

https://www.w3schools.com/howto/howto_css_fixed_menu.asp

I hope I could help with this.

LG Colin

einfachanony363
4 months ago

You mean it’s always on the upper edge?

You could use position:fixed or position:sticky to attach the object to one side. With top and left you can change the position. Above right select for example: top:0; left:0;

Next, you should make sure that the text is always displayed in the middle of the outer box, as I would use the flexbox: display:flex;align-items:center;justify-content:center; width:100%

The rest is left to you and your creativity.

For questions, please write to ^^

o0ojoshua
5 months ago

Hey splitter️,

As I understood your question, you want to know how to make sure that the navigation bar is always visible at the top of the screen.

With CSS, you can make sure that the navigation bar will continue to appear on the top of the screen even after scrolling.

Source code:
Å ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File: index.html


 
    
         
        
        Navigationsleiste 
        
           
    
        
                               
   

Å ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The development is only a hobby of me so far, my answers are based on research and experience, which is why mistakes can occur.

I hope you could help with my answer!

Best regards