I have set padding in my 'body' tag, but I want my top navigation bar to cover the entire page without being affected by it.
I attempted to fix this by setting the width to 100% and using negative padding and margin values, but it did not work as intended.
Here is the relevant code snippet:
html {
height: 100%;
}
.topnav {
background-color: rgb(15, 25, 75);
overflow: hidden;
width: 100%;
float:right;
margin-left: -100px;
padding: 0;
}
body {
/* background: linear-gradient(#9fdaff,#1b4c92); */
background-color: rgb(255, 255, 255);
height: 100%;
margin: 0;
background-repeat: no-repeat;
background-attachment: fixed;
padding-left: 100px;
}
The 'topnav' element is what I am trying to make cover the entire screen.