View Full Version : Table background image in Netscape...
Hello,
[nbsp][nbsp]I am trying to use a background image in table cells, when I specify "background= " in the <td> tag it doesn't show up, but when I specify it in the <table> tag it does.[nbsp][nbsp]This is a problem because I am trying to tile a right and left image on either side of the 3 celled table.[nbsp][nbsp]I wrote the code with IE first, but then opened it in Netscape and the whole page was messed up.[nbsp][nbsp]Anybody know what the problem is here?
Mandi
11-22-2000, 09:31 AM
You'll have to use nested tables to do that properly in NS.[nbsp][nbsp]Put the tables with their unique backgrounds inside the designated <td> . . .[nbsp]
The problem I have is that I would like to do this for pages where the length of the content is variable (cgi-generated), like:
NT-1 | Content | NT-2
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] (varies)
with the image tiled in NT-1 and NT-2.[nbsp][nbsp]Unfortunately, there is no way to make the height of NT-1 and NT-2 automatically correspond to the height of the content.
While I could use an image in a <td> in IE which works great, to be compatible with NS I have resorted to using a background image for the page :-(
[This message has been edited by Jeff (edited 11-22-00@9:03 pm)]
Keiichi
11-22-2000, 09:07 PM
i have a problem like that too..NS doesn't respond to my <td bgcolor=white> unless something is inside the <td></td>. yeah, and i also have the problem of having the table height=100% to work in NS..
unless something is inside
And when a &nbsp; is too big, I resort to the size -2 . or the clear pixel.
It also is too bad that you can't have a color in a table over an image in NS (because the image superseeds, so I end up creating a "white" image... I suppose it's only one more call to the server and a few bytes, but still...)
Haven't been able to get NS 6.0 to install yet; is there any hope that it has more robust table rendering?
(Even if so I suppose, since Netscape is more "compatible" than say, IE, old versions continue to coexist for a long time so it will be a while before NS's table limitations can be overcome... :)
[This message has been edited by Jeff (edited 11-22-00@11:50 pm)]
zolbian
11-23-2000, 06:06 PM
From my experience with tables and NS, background="file.gif" works in both NS and IE if you put it in the <TD> tag and only in IE if you put it in <TR> tag. Also if I'm not misstaking you can not have a background color or image set in the <TABLE> tag if you want the background="file.gif" to work in the <TD> tag in NS!
Saeed
You're right![nbsp][nbsp]Thanks.
Now I just have to figure out why Netscape is moving the TD background one pixel (horizontally) of where Internet Explorer is rendering it thus causing it not to align with the TD background below...
[This message has been edited by Jeff (edited 11-23-00@9:03 pm)]
zolbian
11-24-2000, 01:08 AM
jeff,
Make sure you have cellpadding="0" cellspacing="0" in your <TABLE> tag. I think that might solve the problem.
If you paste the URL to your page I will try check it out as soon as I get a chance.
Saeed
Hey thanks!
Here is an example:
http://boatdesign.net/alignment/
Here is the pixel shift comparison in IE 5.5 and NS 4.7:
http://boatdesign.net/alignment/problem.gif
I need a relatively complex table because I want to emulate http://boatdesign.net/search without the use of frames and a simple background image.
zolbian
11-24-2000, 03:06 AM
Ok..
I looked at your HTML code and noticed there was actually a pixel off. So what I did is I re-created your table and it pretty much looks the same but it´s only made out of 1 table (instead of 3-4 that you had). This one looks exactly like yours and works fine in both IE 5.0 and NS 4.7.
I have put it under my domain:
[nbsp][nbsp]http://www.flashlover.com/_temp/boatdesign_table_fix/
Let me know if this works for you.
Saeed
Thank you, thank you :) :)
I'm finally trying to make myself switch from using Fusion to Dreamweaver, and though I've coded some basic layouts for cgi-scripts by hand, I could not see what was causing the glitch in that page![nbsp][nbsp]Since Netscape's own download page has a very similar thing happening, I thought I might be out of luck...
Thanks again for the help![nbsp][nbsp]Back on track.[nbsp][nbsp]I owe you one.
[This message has been edited by Jeff (edited 11-24-00@03:37 am)]
zolbian
11-24-2000, 08:14 AM
I'm glad I could help.
I'm using Dreamweaver 3 myself. I have tried some other WYSIWYG editors but this one is the best by far. It still requires some hand editing from time to time, but it does the job most of the time. You just have learn how to use it so it looks "right" in both browsers and that only comes with experience (lots of testing!).
Saeed
fscutler
11-25-2000, 03:40 AM
(formerly FSC)****************************
Thanks for all the info regarding tiling a bg image in Netscape.[nbsp][nbsp]I found nested tables have worked for the top and bottom, but a nested table on each side will not vary its' height with the table it's nested in when the content changes in the middle.[nbsp][nbsp]Thus I have mad a new image that stretches the length of the table and tiles on down, just like I want.[nbsp][nbsp]Netscape sure is frusturating...[nbsp][nbsp]
but a nested table on each side will not vary its' height with the table it's nested in when the content changes in the middle. This can usually be worked around by adding a row at the bottom that spans the columns (nested tables).
Dbunk
------------------
The artist formerly known as Dluded
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.