Jump to content

Problems with page height: IE


sanfly

Recommended Posts

Hi

Im trying to be all good and make my new website standards compliant.

When I put the doctype in

[quote]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">[/quote]

It screwed up my page height (was displaying as 100%, as defined in the style tag for the table that envelops everything).

I did a bit of research and found that I also needed to set html, body { height: 100%; }

Did that, and it looks great in firefox, but in IE the table rows are no longer the correct height, despite having their height defined in the css.  I also tried adding the height attributes to the <td> element (inline style tags) but didnt work.

Anyone have an Idea of what I can do to sort this out?
Link to comment
Share on other sites

See this basic example below,  in FF the HEAD cell is 100px tall, but in IE its way huge (more than half the page)

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Testing</title>
<style>
html{
height: 100%;
}
body{
height: 100%;
font-size: 11px;
font-family: verdana;
}
.mainTable{
height: 100%;
width: 880px;
}
.headNav{
height: 100px;
}
</style>
</head>

<body>
<table class="mainTable" border="1">
<tr>
<td class="headNav">
Head
</td>
</tr>
<tr>
<td>
main
</td>
</tr>
<tr>
<td>
foot
</td>
</tr>
</table>



</body>
</html>
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.