I have a container element that has a specific width, s overflow-x: auto. In it, I have a block level header element (h1), which should be a block element, fill the container horizontally. And he does this until there are no other elements in the container that overflow, creating a horizontal scrollbar. If there are overflow elements, then the header element fills only the non-overflowing horizontal space of the container, but does not appear in the overflowing space.
Violin demonstrating the problem: http://jsfiddle.net/rand0mbits/qUh3s/
HTML:
<div id="one">
<h1>header</h1>
<table><tr><td>text</td><td>text</td><td>text</td><td>text</td><td>text</td>
<td>text</td></tr></table>
</div>
CSS
width: 200px;
overflow: auto;
border: solid 1px;
}
font-size 1.1em;
background-color: blue;
display: inline-block;
width: 100%;
margin-top: 0;
}
table td {
border: solid 1px;
padding: 20px;
}
How to make it <h1>fill the entire width of the container?