Forum Moderators: not2easy

Message Too Old, No Replies

1 pixel table region in Netscape 6 not working

         

curtmorrison

12:35 am on May 5, 2004 (gmt 0)

10+ Year Member



Hi everyone,

I'm trying to get Netscape 6 to work with my transparent spacer for table layouts. I want to make a row 1 pixel in height. It works fine in IE and earlier versions of Netscape, but not NN 6. Any ideas? I tried applying a CSS style with height specified too, with no luck.

Thanks.

encyclo

12:48 am on May 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, curtmorrison!

Could you post a short but relevant section of your code? Are you trying to place the spacer image in a

<td>
, or are you doing something else? Have you used any CSS to control table margins, padding, etc.?

curtmorrison

2:29 am on May 5, 2004 (gmt 0)

10+ Year Member



I forgot to mention that it only happens in NN 6 when I specify <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> for the page.

Here's the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="700" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="1" bgcolor="#000000"><img src="/images/spacer.gif" width="1" height="1" border="0" /></td>
</tr>
</table>
</body>
</html>

curtmorrison

2:42 am on May 5, 2004 (gmt 0)

10+ Year Member



Shoot. I found out that NN6 only works with the following HTML 4.01 Doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

This fixed my problem.

curtmorrison

2:48 am on May 5, 2004 (gmt 0)

10+ Year Member



Also, I guess giving the 1x1 spacer a display : block css style works too.

DrDoc

3:27 am on May 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If giving the spacer "display:block" works, do that instead. The doctype you posted is not valid [w3.org], and will cause your layout to break in other browsers. Also, upgrade Netscape to version 6.2, since that's the first stable (and most common) version of NN6.