"bruce barker" <br*********@di scussions.micro soft.comwrote in message
news:26******** *************** ***********@mic rosoft.com...
if you use xhtml or html 4.0 doctypes then:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html>
<body>
<table style="height:1 00%;width:100%; ">
<tr>
<td style="backgrou nd-color:red"</td>
</tr>
</table>
</body>
</html>
then the td will be the width of the page, but only 1 line space high.
this
is because in the w3c standard there is no default height to a body, so
the
heigth:100% is ignored. you must specify an absolute height, or use
javascript to set the height to the viewport size.
Try this:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html style="height:1 00%; overflow:hidden ">
<body style="height:1 00%; overflow:hidden ; margin:0px" scroll="no">
<div style="height:1 00%; width:50%; overflow:auto; float:left">
Long Content<br />
A<br /><!-- Repeat this -->
</div>
<div style="height:1 00%; width:50%; overflow:auto; float:right">
Long Content<br />
B<br /><!-- Repeat this -->
</div>
</body>
</html>
The key thing is to give the html element 100% height which will give it the
height of the viewport. From there child elements with 100% will take the
height of the parent element.
The table approach however fails in FF. The above works in IE and FF.
--
Anthony Jones - MVP ASP/ASP.NET