Forum Moderators: open
i've a little problem with a table in my XHTML document..
<!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" xml:lang="de">
<head>
<title>height test</title>
</head>
<style>
html { height: 100%; }
body {height: 100%; margin: 0px; padding: 0px; background: #3F638A; font-family:verdana,tahoma,arial,helvetica; font-size:10px; font-weight:normal; color:#000000; }
</style>
<body>
<table border="1" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
<tr>
<td style="height: 20px; width: 100%;">top nav</td>
</tr>
<tr>
<td style="height: 50px; width: 100%">top</td>
</tr>
<tr>
<td style="height: 20px; width: 100%">navigation</td>
</tr>
<tr>
<td style="height: 100%; width: 100%;">content</td>
</tr>
<tr>
<td style="height: 20px; width: 100%;">bottom</td>
</tr>
</table>
</body>
</html>
Now the problem is that the page is too height in IE 6...
With HTML4 it was no problem but with XHTML, this seems like a big bug (or not?)
thanx for your help..
greets,
benny
btw: sorry for my bad english :(
-------------------- <--
top nav
--------------------
top
--------------------
content
--------------------
bottom nav
-------------------- <--
now, i want the height of the page is the same like the height of the browser window...and the only cell which height should be variable is the content cell...
so i want top nav and top and bottom nav have fixed heights and the content height is variable...
in html4 is was working with the height attributes but with xhtml and attributes/css (both tested) its not working
The only way (that I can think of anyway) that you can accomplish what you want to do is use an HTML doctype. If you use XHTML, the closest you can come is:
(replace XX with your number)
-------------------- <--
top nav style="height: XXpx"
--------------------
top style="height: XXpx"
--------------------
content style="height: auto"
--------------------
bottom nav style="height: XXpx"
-------------------- <--
This will make the content box expand as far as the content inside the box pushes it. Your page will not always be the exact height of the veiwable area of the browser.
I don't really see why you would want that anyway, because you would have a bunch of extra space in the middle of your page if you don't have enough content. And if you have too much content, the page will be forced down anyway.