Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape tables

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
HI
I gave a row in a table a height of 4 pixels, then filled it with colour. In IE it shows up fine, in Netscape there is no colour. If I add a space in the row  the colour will show up. Anybody know how to solve this Netscape problem?
Thanks
 
netscape will only show background color in cells of a table if it has content. when i want a bgcolor in a cell without having to deal with font sizes and everything is but a transparent image of 1px by 1px in the cell, then make the height whatever the height of the cell is.
 
The best way to overcome this is buy putting another table inside the cell of your color... See my example below. This requires no messing around with images.

Code:
<TABLE BORDER=&quot;0&quot; CELLSPACING=&quot;0&quot; CELLPADDING=&quot;0&quot;>
  <TR>
    <TD BGCOLOR=&quot;003366&quot; HEIGHT=&quot;10&quot; WIDTH=&quot;10&quot;>
      <TABLE BORDER=&quot;0&quot; CELLSPACING=&quot;0&quot; CELLPADDING=&quot;0&quot;><TR><TD></TD></TR></TABLE>
    </TD>
  </TR>
</TABLE>

I hate Netscape.

- Dr
 
i don't know... i think i'd have to say that if i had to choose between 5 bytes for a 1 pixel image or 30 for the extra code for a table, i'd choose the image. plus there can be performance issues with nested tables.
 
Simply add in the table &quot;&nbsp &quot; (one space after the code).
But the height is then eventually greater than 4 pixels, because your
statement defines the minimum height.----G.Hoffmann
 
Funny : the code is lost in the message !
Add   And+nbsp (use the code&quot; Shift 6&quot; for AND , then &quot;nbsp&quot; and one &quot;space&quot; after the code). ---G.Hoffmann
 
if you use &nbsp; then you have to worry about the font size when dealing with rows you want a certain height. thats why i suggest using images, but if you dont mind making styles so that your table rows end up the correct height, it's probably a better way to go then using a transparent image.
 
hmm.... theres sposed to be a nonbreaking space in there, but... it didnt come out. oh well.
 
On three browsers NBSP works well, of course a typeface and a typesize must be active.
If you don´t intend to write text in this row , then it´s of course better to use the transparent GIF.
Source code is readable ! ------G.Hoffmann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top