Nav element at the side of laptop overlapped the main element

How do I ensure the nav element at the side of the laptop view do not overlap the main element of my page

Hello @Dmainwebdev!

What you’re asking depends on each unique case. If you could share your code with us as requested in one of your earlier posts that’d be great.

Nicolas

1 Like
#navbar{position: fixed;top: 0; 
left: 0;
height: 100%;
width:50%;
overflow: auto;
background-color: #000;
margin: 0;}
div nav{height: 3px; width: 30%;background-color: white;}
main{width: 100%; font-family: 'Open Sans', sans-serif;
margin:0px;}
*{box-sizing: border-box;}
html{font-size: 18px;}
type or paste code here

this my css code … what do i need to do?

3 Likes

Thanks, @Dmainwebdev .

You need to format this CSS. It looks incomplete to me. Also, give me some HTML to work with. We really can’t tell the solution from this.

Thanks for your patience!

1 Like

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').