[WEB4LIB] Re: Netscape and the thin black line

Andro Gagne apgagne at frontiernet.net
Wed May 22 23:41:25 EDT 2002


Vicki:

         At 04:52 PM 5/22/02 -0700, you wrote:

>many thanks to those who offered suggestions.
>
>for those interested, this worked:
>
><tr bgcolor="#003366">
><td height="1" colspan="3" valign="top"><img src="media/blank.gif"
>height="1" alt="" width="1"></td>
></tr>
>
>but this didn't:
><tr><td valign="top" height="1" bgcolor="#003366"><img
>src="../media/blank.gif" height="1" alt="" border="0" align="top"></td></tr>
>
>i don't understand why!!

         First, let me say that I sent a response to your last posting to 
the list, but you may not have received it, as your e-mail server was 
having trouble accepting mail earlier today.  Basically what my posting 
said was that you need enough space-occupying text and/or images in the 
content-displaying part of the table to open the table the full length 
(vertical distance) of a monitor screen in order for the cell holding the 
line code to be collapsed.  (My previous message's comment about a 
"screen's worth of content" was referring to filling up a screen 
vertically, not width-wise.)

         While I would have written the code snippets you included in your 
message (above) differently, probably the main reason the second snippet 
doesn't work--assuming the rest of the page's code is the same for both 
snippets--is that its image tag is telling the server to look for the 
single pixel GIF image in a different directory than the first snippet is 
doing.  My guess is that "blank.gif" is located in the "media/" directory, 
but not in the "../media/" directory (with two dots before the 
slash).  With this type of table coding for a line, Netscape 6 gives you a 
"fat" line if it cannot find the single pixel GIF image.  If "blank.gif" is 
located in the "media/" directory (which also is equivalent to "./media/" 
with just one dot before the slash), I would write your code snippet this 
way for a line with a thickness of 1 pixel:

<tr>
<td height="1" bgcolor="#003366">
<img src="./media/blank.gif" height="1" width="1" border="0"><br>
</td>
</tr>

Then I would make sure the table had enough content to cause it to take up 
the vertical length of a monitor screen.  Try this in your test page with 
enough content to make the table fill up a screen vertically, and I'm 
pretty sure you'll find the code works the way you want it to.

         Having said this, I would agree with Thomas Dowling that using CSS 
border properties is a more elegant solution.  I just haven't gotten around 
to trying it yet and checking whether the various Web browsers have 
implemented CSS borders in the same manner.  Mr. Dowling, what are your 
observations on this?  Are all the browsers together on this part of CSS?

Best regards,

Andro P. Gagné
Andro Gagné Web Design



More information about the Web4lib mailing list