Click to See Complete Forum and Search --> : tbody is creating problem in firefox


KalyanRaj
05-16-2007, 01:57 AM
hello all,

I have the following code which is working fine in IE but not in Firefox. I declared the tbody height to 500px and when there is only one row in the table IE is not showing the entire height where as firefox is showing the entire height with white colour. How can i make it work in firefox. Help me out...


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html><head>

<meta name="keywords" HTTP-EQUIV="CACHE-CONTROL" content="One1Clear Finance, Multiservice Transaction Management, Cibernet, Cibernet $O1CName: Reports, Help - Reports;NO-CACHE">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

<style type="text/css">

div.tableContainer {
width: 135%; /* table width will be 99% of this*/
height: 550px; /* must be greater than tbody*/
overflow: auto;
margin: 0 auto;
}
table.report .c { text-align: center }
table.report .r { text-align: right }

table.report {
width: 99%; /*100% of container produces horiz. scroll in Mozilla*/
border: none;
background-color: #f7f7f7;
}

table.report>tbody { /* child selector syntax which IE6 and older do not support*/
overflow: auto;
height: 500px;
overflow-x: hidden;
}

table.report thead tr {
position:relative;
top: expression(offsetParent.scrollTop); /*IE5+ only*/
}

table.report thead td, thead th {
color: #FFFFFF;
text-align: center;
background-color: #6699FF;
}

table.report td.h {
color: #FFFFFF;
text-align: center;
background-color: #6699FF;
}

table.report td {
font-size: small;
color: #000000;
text-align: left;
background-color: #CCCCFF;
vertical-align: top;
padding-right: 0.75ex;
padding-left: 0.75ex;
}

tfoot td {
text-align: center;
font-size: 11px;
font-weight: bold;
background-color: papayawhip;
color: red;
border-top: solid 2px slategray;
}

td:last-child {padding-right: 20px;} /*prevent Mozilla scrollbar from hiding cell content*/

</style>

<title>Cibernet $O1CName: Reports</title>

</head>
<div align='center'>
<font size='2'><table class="report" $border cellspacing="1" cellpadding="1" style="margin-top:-1">
<thead>
</table><br />
</font></div><div align='center'>
<font size='2'><table class="report" $border cellspacing="1" cellpadding="1" style="margin-top:-1">
<thead>
<tr><td class="h">Payer Entity</td><td class="h">120+ Days</td><td class="h">90 Days</td><td class="h">60 Days</td><td class="h">30 Days</td><td class="h">Current</td><td class="h">Total</td></tr></thead>
<tr><td class="c"></td><td class="c">0.00</td><td class="c">0.00</td><td class="c">0.00</td><td class="c">0.00</td><td class="c">23,617.90</td><td class="c">23,617.90</td></tr>

</table><br />
</font></div>
<center><font size="1" color="gray">
<i><b>Cibernet proprietary.</b> All information on this web site is restricted to use pursuant to Cibernet instructions.</i><br>
(Generated 2007/05/15 14:06:26 UTC in 0.95 seconds)
</font></center>

</body><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD></html>


Raj

Fang
05-16-2007, 03:23 AM
max-height: 500px;

KalyanRaj
05-16-2007, 05:39 AM
Hi Fang,

As suggested by you i kept the max-height attribute and it removed white colour but giving me a side-effect of scrolling the header.

Actually, I kept my table header freezed and making the tbody scrolling. If there are any rows below the height of t-body it is giving white space.

How to make my header freezed and dont show any white space if there are any rows below the height specified.

any suggestions please...
Raj

Fang
05-16-2007, 05:45 AM
As suggested by you i kept the max-height attribute and it removed white colour but giving me a side-effect of scrolling the header.Not in the document given, give a full example with the problem.

KalyanRaj
05-16-2007, 06:04 AM
Fang,

I'm attaching a text file with all the code iam working on.

1) I want to keep my header freezed.
2) If there are rows with the height less than the height of tbody, then no white space should be displayed.

if there are more rows above tbody height, my header is also scrolling which i dont want.

plz help me out.

ray326
05-16-2007, 02:14 PM
You have no tbody and why are there no ths in the thead?

drhowarddrfine
05-16-2007, 06:35 PM
Use a proper doctype. IE is in quirks.