SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Nov 3, 2004, 15:53 #1
- Join Date
- Apr 2001
- Posts
- 124
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
IE 5.0 support table height and width?
Hi, i'm having some problems with IE5.0 supporting table height="100%" and width="90%". It actually stretches the page to aprox. 120% in width.
Is this a known issue? If so, how do I get around it?
Thanks!
-
Nov 3, 2004, 16:28 #2
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi,
100% height is a sticky issue and height on tables is something that was never supposeed to be anyway.
Here is an example of a table at 100% height and 90% width. IE needs to be in quirks mode for this to work which is done by using the xml prologue.
Code:<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- force quirks mode with the xml prologue --> <style type="text/css"> /* commented backslash mac hack \*/ html, body{height:100%; padding:0;margin:0} /* end hack */ body { height:100%; padding:0; margin:0 } table { height:100%; width:90%; border:1px solid #000; } td {border:1px solid red;vertical-align:top;} td#toprow {height:24px;width:120px;} } </style> </head> <body> <table cellspacing="0" cellpadding="0"> <tr > <td id="toprow">1</td> <td>2</td> </tr> <tr> <td>3</td> <td><p>4</p> <p>5</p> <p>5</p> <p>0</p></td> </tr> </table> </body> </html>
PaulLast edited by Paul O'B; Nov 3, 2004 at 17:20.
-
Nov 3, 2004, 16:52 #3
- Join Date
- Apr 2001
- Posts
- 124
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank you very much, Paul.
I'll give this a try tomorrow.
Bookmarks