.navbar {
overflow: hidden;
background-color: antiquewhite;
position: absolute;
top: 0;
width: 100%;
}
.navbar a {
float: right;
display: block;
color: Black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 22px;
}
.container {
width: 80%;
background: aqua;
margin: auto;
padding: 10px;
}
.main {
padding: 16px;
margin-top: 30px;
width:1000px;
margin-left:15px;
}
#navbarItem {
list-style-type: none;
margin: 0;
padding:0;
}
li a:hover {
background-color: #b6ff00;
color: white;
}
.main{
padding-top:100px;
padding-left:100px;
padding-right:100px;
border: 1px solid green;
}
.navbar2{
width:15%;
float:left;
border: 2px solid red;
}
Is there a way I can align the two divs (.main and .navbar2) within the container div? My goal is to have the main content and navbar side by side within the container. I plan to make the navbar fixed so it stays in place as I scroll down. I may also add a third div to the right side of the website in the future.