Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XHTML Table 100% High Problem

Status
Not open for further replies.

da644

Programmer
May 21, 2001
159
GB
Hi Everyone.

I'm having a problem with getting a table to be 100% height in XHTML. If I change my DOCTYPE back to HTML4.01 it works fine. I set the width and height in a CSS stylesheet by adding the following class to the stylesheet.

.mainTable {
height:100%;
width:100%;
}

I've then created the table using this class:-

<table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; class=&quot;mainTable&quot;>

Anyone know why it ignores the height:100%?

Best Regards

Andrew.
 
Try using the HTML Trans. DOCTYPE and view the page in a browser other than IE, and it won't work. The problem is that IE is too forgiving with html, but it follows the standards for XHTML. You can set the height of the table to 100% by sticking:
style=&quot;height:100%&quot;
in the table itself, but you will end up running into a number of other problems with cell spacing.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top