I have two objects inside the frame (Table and Div). Below of the table there is a gray bar. Please guide me why gray bar width is not coming 100% to end of the page. If you scroll the frame to the right, you will notice the gray bar is half of the table. How can I make it exactly the same width as table? Note: I cannot use pixel. Table and Div both should be in in percentage.
Fiddle : http://jsfiddle.net/awaises/78Zfa/
CSS:
.frame{
overflow-x: scroll;
width:100%;
}
.gray-bar{
background:#cdcdcd;
padding:6px 0;
width:100%;
height: 20px;
}
HTML:
<div class="frame">
<table border="1" width="100%">
<tr>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
<td>Nam luctus</td>
<td>Nam luctus sem sit amet</td>
<td>Nam luctus sem sit amet fermentum tincidunt</td>
</tr>
</table>
<div class="gray-bar">Edit | Delete</div>