Reputation: 1173
I'm using the 'section' element as a container within the 'header' element.
The container is not displaying in any way.
Live: http://blnr.org/testing
HTML
<!-- start pagewrap -->
<div id="pagewrap">
<!-- start header -->
<header>
<section id="container">
</section>
</header>
<!-- end header -->
</div>
<!-- end pagewrap -->
CSS
header {
position: absolute;
left: 0px;
width: 100%;
height: 65px;
background-color: #F9F9F9;
border-bottom: thin solid #C6D9F1;
margin: 10px 0 10px 0;
}
header section #container {
width: 900px;
height: 30px;
border: thin dotted black;
margin: 0 auto;
}
Upvotes: 1
Views: 555
Reputation: 23344
The space between section
and #container
means it's a selector for an element with the id 'container' inside the section block. Remove the space:
header section#container {
width: 900px;
height: 30px;
border: thin dotted black;
margin: 0 auto;
}
Upvotes: 0
Reputation: 15376
You have a tiny mistake:
change: header section #container
to header section#container
in your CSS as in:
header section#container {
width: 900px;
height: 30px;
border: thin dotted black;
margin: 0 auto;
}
What you did is basically looking for an element width id="container"
inside the section.
Upvotes: 1