Just a quick question:
I'm working on formatting my HTML and CSS, and I have the following code:
<div class="container">
<div id="header">
<div id="navbar">
</div>
</div>
</div>
This is how my CSS looks like:
.container {
position: relative;
text-align: left;
width: 100%;
background-color: yellow;
}
#header {
position: relative;
background-color: red;
height: 120px;
width: 960px;
margin: auto;
}
Currently, my header (red container) stretches from left to right at 100% width. However, I want it to be centered within a specific width. Can anyone provide guidance on achieving this? Thank you in advance! =)