Re: Tables, backgrounds, HTML4, and, of course, style sheets...

by "Roger Stenning" <roger(at)isgwds.enterprise-plc.com>

 Date:  Mon, 8 Nov 1999 05:02:22 -0000
 To:  <hwg-style(at)mail.hwg.org>,
<webmaster(at)thedigitalpage.com>,
<david(at)heroes.force9.co.uk>,
<paul.tyng(at)dealerkid.com>,
<carole(at)designs.com>
 References: 
  todo: View Thread, Original
Hi!

A whole load of people (singled out for thanks below!) replied to me, both
on the digest list, and directly, regarding my table background image snag.
In no special order, they are:

Jim <webmaster(at)thedigitalpage.com>
"David Meadows" <david(at)heroes.force9.co.uk>
Paul Tyng <paul.tyng(at)dealerkid.com>
and
"Carole A. Gay" <carole(at)designs.com>

The consensus of a solution was modification of the style sheet that I was
using, and was:

> >If you want to cut out some repetition, try this:
> >
> >TD {background-color: #F2F2B3}
> >TD.top1 {background-image: URL(graphics/top1.gif) }
> >TD.left {background-image: URL(graphics/legalpad_05.gif) }
> >TD.right {background-image: URL(graphics/legalpad_05a.gif) }
> >
> >This will apply the background colour to all the TD elements and then
apply
> >the background images to the three specific classes.
> >
> >TD.top1, TD.left, and TD.right will "inherit" any styles you apply
generally
> >to TD, plus they will also use any styles specifically applied to them.
If
> >there are ever any conflicts, the specific styles take precedence.

I've added a class to the stylesheet, which appears, on the prototype and
concept page to work just fine.

The class I added to the style sheet was:

        .logoback {
            background-image: url(images/html4isgbg.gif);
            background-repeat: repeat-y;
            background-color: #ffffff;
        }

This has been worked into the page, by adding the classname to the required
TD tags, including the footer. The repeat-y element was added to prevent
horizontal tiling in the footer table cell, which spans four columns. The
resulting markup works in both NN4.7 and IE5.

On another prototyping page some two levels down in the directory, I've had
to embed the CSS, rather than link to it, but I suspect that's a
sub-directory linking snag, which embedding has overcome.

Either way, the result has now been posted, but *not* validated (yet), at
http://web.ukonline.co.uk/roger.stenning/development.html, with the linked
stylesheet at
http://web.ukonline.co.uk/roger.stenning//style_sheets/melsb.css.

I'd like to thank you all for your help: No other mailing list, or
newsgroup, bothered to either reply, or even post a solution, and that
INCLUDES the Netscape DevNet secure newsgroups!

HWG scores again!

Best regards,

Roger Stenning
Intelligent Web Design Services
    http://iws.n3.net/
Contact me for my PGP Public Key.

Main ISG gateway site:
    http://isg.n3.net/
Impossible Scenarios Group main web site:
    http://web.ukonline.co.uk/roger.stenning/index.html
Visit the Millennium's End London Sourcebook!
    http://web.ukonline.co.uk/roger.stenning/melsb/melsb_index.html

HWG hwg-style mailing list archives, maintained by Webmasters @ IWA