I have one header
, and two div
elements. The outer div
is vertically centered in my header
element. I want the inner div
to stretch to 100% width. How do i do this?
Check this fiddle for reference. I want the blue section to take up 100 % of the total width.
Here's the code aswell:
HTML:
<header id="header-index">
<div id="header-index-inner">
<div id="inner-div">
<h1>Header</h1>
<h5>Subheader1 </h5>
<h5>Subheader2 </h5>
</div>
</div>
</header>
CSS:
#header-index{
background-color: red;
}
#header-index-inner{
width: 100%;
display: table-cell;
vertical-align: middle;
height: 400px;
}
#inner-div{
background-color:blue;
width:100%;
}