View Full Version : Table bg image & netscape
three
08-29-2001, 01:01 AM
I need to display a background image in a table. It works perfect in IE, but doesn't work at all in Netscape. Any suggestions for a workaround that will work in both IE and Netscape? Or is there perhaps a different way to code this so it will work in netscape? Or am I just plain out of luck?
thanks!
How did you code the bg image? I believe bg elements can only be displayed in <td> elements for many Netscape versions.
Rich
three
08-29-2001, 12:36 PM
I coded it in the <table> tag: <table bgimage="image.gif"...
It works in IE but no go in netscape. Maybe i'll just have to do without the bg image.
Netscape should display the background image in a table using the table tag
<table BACKGROUND="yourimage.jpg">
Hope this helps,
Bob
three
08-29-2001, 12:46 PM
Oops, I mistyped before. I am using <table background="image.jpg"...
and it doesn't work in netscape version 4.7 anyways, perhaps it works in other versions only?
Quick question?
Have you tried viewing it with some text entered into the table? I believe that Netscape will not show any images as background unless there is some content as well.
Hope that makes sense :\
Bob
three
08-29-2001, 01:06 PM
Yes, there is text and images in the table.
Any chance of slapping this puppy up on the web somewhere so we can take a look? I am using Netscape 4.7 versions and see images coded into tables in the above manner w/o any problems.
Bob
thudfactor
08-29-2001, 01:47 PM
Bob, Three:
It sounds to me like Three wants the image to display continuously in the background. He doesn't want it to start over again with each table cell.
I thought I had the answer to his problem; but I did not. I'm using IE 6 and Netscape 4.7. This page (http://www.thudfactor.com/test/table_test.html) shows the results of coding a table with a background image several different ways.
-- J
Edit: I just loaded it in Mozilla (AKA Netscape 6.1), and it behaves like IE 6 does....
three
08-29-2001, 02:01 PM
Yes, you are correct, I don't want the image to repeat in each cell, but rather display continuously across the entire table. I guess i'm out of luck, and need to start slicing and dicing.
Here is the thing - I want the "background" image and table to be centered horizontally and vertically on the page, and move identically when the browser is resized. Maybe not possible in both IE and Netscape? If you have other ideas let me know. Thanks a lot!
thudfactor
08-29-2001, 04:36 PM
I'm not sure with Mozilla -- I've only been using it for a day or so -- but I never could find a way to get Netscape to center an image smack in the middle of a browser page. In IE you can do it with (again) a container table:
<TABLE WIDTH="100%" HEIGHT="100%">
<TR>
<TD WIDTH="100%" VALIGN="MIDDLE" ALIGN="CENTER">
<!-- Page content goes here -->
Whatever you want -- tables, images, etc.
<!-- End Page content -->
</TD>
</TR>
</TABLE>
In Netscape, all this does is center content on the horizontal axis, and leave things pushed to the top of the page -- Netscape 4.7 and lower, as far as I could tell, supported no analogue to the "Height" attribute. But I found it generally servicable.
You MAY be able to layer tables and images in both Netscape and IE using Cascading Style Sheet Positioning (CSS-P), but as that breaks something awful on older browsers, I never really got into it. Of course... now, older browsers *are* the 4.0 versions. Maybe it's time to revisit.
Anyone else have any ideas?
Netscape 4.7 and lower, as far as I could tell, supported no analogue to the "Height" attribute.
On this page (http://mainframegallery.com) I used a table with height=100% to center the contents vertically; it appears to work just fine in NS 4.7 so I believe the height=100% is supported.
thudfactor
08-30-2001, 08:15 AM
Yup, you're right, Jeff. Maybe that should read "earlier versions of netscape." I don't have anything older than 4.5, but I do remember it being a genuine pain beforehand. :-)
-- J
(Who needs to remember to test things first.)
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.