100% tabel, kun én række har ikke fast højde.
Hej eksperter,Nu har jeg stirret mig blind på dette problem. Jeg synes jeg har løst noget tilsvarende 100 gange før, men er gået helt i stå.
I FX virker det fint (billede: http://imv.au.dk/~jensgram/public/fx.jpg ), men IE vil ikke lade "masser af tekst..."-feltet udvide sig (billede: http://imv.au.dk/~jensgram/public/ie.jpg ). De resterende rækker skulle gerne bevare den faste højde, mens hele tabellen skal være 100% af browserens højde. Kildekoden er:
--- HTML ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="author" content="Jens Gram">
<title>Børnehuset Hanehøj » Forside</title>
<link type="text/css" rel="stylesheet" href="/hanehoej/www/core/styles/hanehoej.css">
</head>
<body>
<table border="1" cellspacing="0" cellpadding="0" id="tableBody" align="center">
<tr>
<td colspan="5" id="tdBanner"><img src="core/gfx/topbanner.png" width="750" height="61" border="0" alt=""></td>
</tr>
<tr>
<td colspan="5" id="tdMenu"><img src="core/gfx/menu-hane.png" width="150" height="22" border="0" alt=""></td>
</tr>
<tr>
<td class="tdBannerImg">1</td>
<td class="tdBannerImg">2</td>
<td class="tdBannerImg">3</td>
<td class="tdBannerImg">4</td>
<td class="tdBannerImg">5</td>
</tr>
<tr>
<td colspan="4" id="tdBody">
<h1>Overskrift</h1>
<p>Masser af tekst...</p>
</td>
<td id="tdColumn">mere...</td>
</tr>
<tr>
<td colspan="5" id="tdFooter"><img src="core/gfx/footer.png" width="750" height="65" border="0" alt=""></td>
</tr>
</table>
</body>
</html>
--- /HTML ---
Jeg kunne godt tænke mig at vide, hvad jeg overser.
--- CSS ---
html, body {
margin: 0px;
padding: 0px;
height: 100%
}
table#tableBody {
/*background-color: rgb(230, 245, 250);*/
width: 750px;
height: 100%
}
td#tdBanner {
height: 61px;
background-color: rgb(240, 240, 240)
}
td#tdMenu {
height: 22px;
background-color: rgb(255, 0, 0)
}
td.tdBannerImg {
height: 90px;
/*border-color: rgb(240, 240, 240);
border-style: solid;
border-width: 2px 1px 2px 1px*/
}
td#tdBody, td#tdColumn {
font-size: 10px;
line-height: 14px;
font-family: verdana, arial, sans-serif;
color: #000000;
vertical-align: top
}
td#tdBody {
padding: 10px;
width: 600px
}
td#tdColumn {
padding: 10px 5px 10px 5px;
width: 150px
}
td#tdFooter {
height: 65px;
vertical-align: bottom
}
h1 {
font-size: 14px;
font-family: arial, sans-serif;
color: #000000
}
a, a:link, a:visited {
color: #f00;
text-decoration: underline
}
a:hover, a:active {
color: #fc0;
text-decoration: none
}
--- /CSS ---
Vh Jens Gram
