homepage Welcome to WebmasterWorld Guest from 54.235.227.60
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Browsers / Firefox Browser Usage and Support
Forum Library, Charter, Moderators: incrediBILL

Firefox Browser Usage and Support Forum

    
Doctype DTD screws up layout in IE
It validates and works fine in Firefox
JohannesKlapwijk




msg:1589409
 7:46 am on Jul 26, 2005 (gmt 0)

Hi,

I'm trying to build a valid HTML page using CSS and HTML 4.0.1.

When I add the doctype, my page doesn't render correctly anymore in IE, though Firefoex works perfectly.

The code and CSS do validate.

It has something to do with heights.. Maybe one of you could look at this?

<SNIP>

Thanks!
Johannes

[edited by: BlobFisk at 8:57 am (utc) on July 26, 2005]
[edit reason] No URLs please! See TOS [webmasterworld.com] [/edit]

 

tedster




msg:1589410
 9:06 am on Jul 26, 2005 (gmt 0)

What DTD are you using?

JohannesKlapwijk




msg:1589411
 10:37 am on Jul 26, 2005 (gmt 0)

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

but loose doesn't help either.

I use tables and I set heights in td's.. that is ok right?

Sine I can not add a link here's some stripped code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style/default.css">
</head>
<body>
<table id="pageBody" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td colspan="3" height="18"><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
<tr>
<!-- left bar -->
<td width="18">
<table class="noSpacing" cellspacing="0" cellpadding="0">
<tr><td height="30"><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
<tr><td class="banner" height="158"><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
<tr><td><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
</table>
</td>
<td width="864" valign="top">
<table id="innerBody" border="0" cellspacing="0" cellpadding="0">
<!-- navigatie -->
<tr>
<td colspan="3" height="29">
Navigatie
</td>
</tr>
<!-- banner -->
<tr>
<td class="banner" width="499" height="158" align="right"><img src="images/banner_title.jpg" height="53" width="477" border="0" alt="Home"></td>
<td class="banner" height="158"><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td>
<td class="banner" width="272" height="158"><img src="images/banner_photo.jpg" height="158" width="272" border="0" alt="Home"></td>
</tr>
<!-- body -->
<tr>
<td colspan="3" align="center">
<br>
<table id="content" border="0" cellspacing="0" cellpadding="0">
<tr><td>body</td></tr>
</table>
</td>
</tr>
</table>
<div align="right"><label class="copyRight">Images (c) Johannes Klapwijk</label></div>
</td>
<!-- right bar -->
<td width="18">
<table class="noSpacing" cellspacing="0" cellpadding="0">
<tr><td height="30"><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
<tr><td height="158"class="banner"><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
<tr><td><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
</table>
</td>
</tr>
<tr><td colspan="3" height="18"><img src="images/spacer.gif" height="1" width="1" border="0" alt=""></td></tr>
</table>
</body>
</html>

I'm sorry, I don't know how to apply tabs in the code on this forum.

JohannesKlapwijk




msg:1589412
 10:43 am on Jul 26, 2005 (gmt 0)

Oh, let me be more specific.

In IE the height of "navigatie", "banner" and "body" are screwed up. Banner and navigation become too high, the body is var to low (trimmed as much as possible in height)

Can it be that undefined heights do not fill out when you add a specific dtd?

JohannesKlapwijk




msg:1589413
 10:58 am on Jul 26, 2005 (gmt 0)

okay.. I calculated all the sizes and filled them all ihn.. it works now.. but isn;t a not defined height supposed to fill up?

Like I have a table of 100px height
1 row with a td of 20 heigh
1 row with a td without height definition
1 row with a td of 20 heigh

Shouldn't the middle row simply become 60px?

tedster




msg:1589414
 7:05 pm on Jul 26, 2005 (gmt 0)

It sounds like a quirks mode - standards mode problem. Does this thread help?

[webmasterworld.com...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Firefox Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved