Welcome to WebmasterWorld Guest from 126.96.36.199 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
DOCTYPE causes <h1> alignment problem in Firefox Confused - please help horse msg:1590482 6:26 am on Nov 5, 2004 (gmt 0) I have some text in the top left hand corner of a table cell, which was working ok until I put the DOCTYPE statement in my code. It now drops the text down in Firefox, but is still fine in IE.
If I remove the H1 tag or the DOCTYPE declaration it displays correctly again.
I know I could just lose the H1 and increase the text size, but I would like to keep the H1 for SEO.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <head> <title>New document</title> </head> <body> <table width="770px" border="1"> <tr height="120px" width="400px" > <td valign="top" ><h1>>Widgetguide.com</h1></td> </tr> </table> </body> </html>
Anyone have any ideas to get round this?
tedster msg:1590483 6:47 am on Nov 5, 2004 (gmt 0)
Try <h1 style="margin:0;"> -- or better still, add the same rule to an external css file if you have one.
It sounds like a
Quirks Mode vs. Standards Mode [ webmasterworld.com] issue. The full DTD switches modern browsers into standards mode and IE (even version 6) is pretty far from standards, so you only see this in newer browsers. horse msg:1590484 7:29 am on Nov 5, 2004 (gmt 0)
Thanks Tedster, problem solved