Re: Tables, backgrounds, HTML4, and, of course, style sheets...
by "David Meadows" <david(at)heroes.force9.co.uk>
|
| Date: |
Wed, 3 Nov 1999 19:11:46 -0000 |
| To: |
<hwg-style(at)hwg.org> |
| References: |
thedigitalpage |
| |
todo: View
Thread,
Original
|
|
Jim <webmaster(at)thedigitalpage.com> wrote:
> I'm using these classes to use a background graphic in cells on my site:
>
> TD.top1 {background-color: #F2F2B3;
> background-image: URL(graphics/top1.gif) }
>
> TD.left {background-color: #F2F2B3;
> background-image: URL(graphics/legalpad_05.gif) }
>
> TD.right {background-color: #F2F2B3;
> background-image: URL(graphics/legalpad_05a.gif) }
>
> Seems to work fine in NS / IE on both Mac / Windows. I know part of this
is
> repetitious[...]
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.
--
David Meadows [ Technical Writer | Information Developer ]
DNRC Minister for Littorasy * david(at)heroes.force9.co.uk
"I must Create a System or be enslav'd by another Man's.
I will not Reason and Compare: my business is to Create"
-- William Blake
HWG hwg-style mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.