Hi everyone,
Can anyone tell me why the top paragraph block stretches across the
screen (as you would expect), while the bottom div doesn't stretch
across the entire screen? When I set the width to 100% (which I
interpret as saying 'make this width the same width as the parent
(which is the entire screen)) the div is made just wide enough to fit
it's contents, and if I decrease the value for the width, the width of
the div stretches?!
<html>
<body>
<br /><br /><br />
<p>out of div</p>
<div style = "
background: transparent url('../main/images/header_center.g if')
repeat-x center left;
height: 100px;
display: table-cell;
vertical-align: middle;
width: 3%"/>
<p style="text-align:center">
yeah
</p>
</div>
Thanks
Taras
Can anyone tell me why the top paragraph block stretches across the
screen (as you would expect), while the bottom div doesn't stretch
across the entire screen? When I set the width to 100% (which I
interpret as saying 'make this width the same width as the parent
(which is the entire screen)) the div is made just wide enough to fit
it's contents, and if I decrease the value for the width, the width of
the div stretches?!
<html>
<body>
<br /><br /><br />
<p>out of div</p>
<div style = "
background: transparent url('../main/images/header_center.g if')
repeat-x center left;
height: 100px;
display: table-cell;
vertical-align: middle;
width: 3%"/>
<p style="text-align:center">
yeah
</p>
</div>
Thanks
Taras
Comment