[thelist] Netscape 6: Doctype Declarations Can Break Table Layouts
Bill Mason
data at data1701d.com
Fri Dec 22 16:53:43 CST 2000
At 12:16 PM 12/22/00, you wrote:
>Even so, when Netscape 6 rendered the page, it added vertical space
>to some table cells (incidentally, I found that setting the CSS line-height
>property to the equivalent of the table-cell height fixed the problem in
>Netscape 6, but caused horrible side-effects in Netscape 4.x).
You can work around that (assuming your CSS is called via a <link> tag) by
adding something like this after the <link>:
<script language="JavaScript" type="text/javascript">
var detect = navigator.userAgent.toLowerCase();
// Browser detect
var opera = (detect.indexOf("opera") != -1);
var scape = (!opera && detect.indexOf("compatible") ==-1);
// the Opera checks make sure that the user's browser isn't an Opera one
spoofing Netscape
// Version detect
var num = navigator.appVersion.charAt(0);
// if using NN6, write a style tag that fixes display problems.
if ((scape && num ==5)) { // NN6 reports itself as version 5, so we test
for version number 5 here
document.write('<style type="text/css">TD {line-height: #;}</style>')
// set the line-height to whatever value fixes the problem in NN6
}
</script>
Bill Mason
data at data1701d.com
Dateline: Starfleet
http://www.data1701d.com
http://profile.guru.com/billmason
http://www.freeagent.com/billmason
http://bmason.freelancers.net
More information about the thelist
mailing list