>> That much I know. What I want is for the cell with that background to
>> not be there normally, but get inserted by CSS. I know the HTML code I
[quoted text clipped - 24 lines]
>CSS 2 Background properties:
>http://www.w3.org/TR/REC-CSS2/colors.html#background-properties
<no.john@spammers.virginiaquilter.allowed.com> noted:
> Interesting, but I already have a background image in the cell. The
> cell's width varies throughout the site as the content varies and we
> allow the browser to flow the text itself.
Perhaps, then, apply the background image to the table itself as outlined
previously for the cell -- then padd the cells accordingly?
Like I said, you cannot insert HTML using CSS (though, in a sense, you can
/hide/ html that's already there). So, creatively coming up with a
workaround is an option -- otherwise, you're stuck re-coding it to
accomodate. It would be entirely feasible (and a good idea for the future)
to replace those tables with divs and even, perhaps, include a few extra
spans to leave yourself room to input these seasonal touches. It would
require a bit of a time investment, initially, but would save time (and
headache) later on.

Signature
Allen http://theprawn.com
This is for the flowers, http://protempore.org/jarday
who have no appreciation
for beauty;
And the sheer ugliness of it all
will surely be lost on them.
John A. - 26 Dec 2003 05:54 GMT
><no.john@spammers.virginiaquilter.allowed.com> noted:
>
[quoted text clipped - 13 lines]
>require a bit of a time investment, initially, but would save time (and
>headache) later on.
Well, after a Javascrip-based false start (I had a script invoked from
between a <tr> and a <td> to write the desired code, which worked fine
in all browsers tested until Netscape Composer insisted on wrapping
the invocation code with <td></td>,) I'm going with a combination of a
mostly blank extra cell with its own class name and CSS to modify it.
It works fine in NS7.01, and in Mozilla 1.5rc1, but IE5.5 and NS4.7
don't expand the cell width per the CSS.
HTML code...
<td rowspan=3 BACKGROUND="/tanquilt3.jpg" width=0 BGCOLOR="#CDBE9D"
class="decobord"> </td>
(Had to include default color & background and a non breaking space
for NS4 to not just put a blank gap left of our navigation bar. NS7
and Moz. don't render a gap. Didn't test IE for that bug.)
CSS code...
td.decobord {
width:32px;
background: url(/images/tanquilt3holiday.jpg);
margin:0;
padding:0; }
The test page...
http://www.virginiaquilter.com/test/testproduct.html
Can anyone suggest a workaround? I really don't want to have the cell
always at the decorative width, and would like CSS-less browsers to
default to something narrow. (I'm guessing systems still running those
browsers would tend to have lower display resolutions too.)
Would sticking something else in the table, like a 1-pixel transparent
spacer GIF, and having CSS resize it when I decorate do the trick?
Thanks for any insight!
JA
John A. - 26 Dec 2003 06:16 GMT
>The test page...
>
[quoted text clipped - 7 lines]
>Would sticking something else in the table, like a 1-pixel transparent
>spacer GIF, and having CSS resize it when I decorate do the trick?
Okay, after asking if that would work theoretically, I went ahead and
did it. It seems to work.
New HTML code...
<td rowspan=3 BACKGROUND="/tanquilt3.jpg" width=0 BGCOLOR="#CDBE9D"
class="decobord"><img src="/images/spacer.gif" width=0
class="decospace"></td>
New CSS code...
td.decobord {
width:32px;
background: url(/images/tanquilt3holiday.jpg);
margin:0;
padding:0; }
img.decospace {
width:31px; }
Test page still as above.
Seems to work in all tested browsers.
But would putting, say, a DIV instead of an image perhaps be more
bandwidth- and connection-efficient? Or would that have as much
backwards-compatibility as using the image+CSS?
Thanks!
JA