[thelist] 2 CSS Questions

David Bindel dbindel at austin.rr.com
Fri Aug 16 13:07:01 CDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> -----Original Message-----
> From: Behalf Of Brian W. Reaves
> 1)       I want all header tags to be referenced by a single class. Do I
> have to create an entry for each H tag:
>
> h1, h2, h3, h4, h5, h6, h7.mail {
> background: #fff;
> color: #000;
> font-family: verdana, helvetica, arial, "sans serif";
> }


Unfortunately, you do have to type out the element name.  I'm not sure where
you are getting "h7.mail" from though... the heading (h*) elements only go
from h1 to h6.


> 2)       I think I need to use a contextual Selector but I do not know how
> to create it when using more than one tag. This situation uses a class tag
> in a div, but their are td & p tags within the div which I do not have
> access too:
>
> DIV.mail td p {
> background: #fff !important;
> color: #000 !important;
> font-size: 12pt !important;
> font-family: verdana, helvetica,  arial, "sans serif";
> padding: 10px !important;
> }


"DIV.mail td p" is a reference to all paragraphs inside of table cells
contained in DIV.mail (all p's in td's in DIV.mail).  But this is not what
you want.  You SHOULD write it like this:

div.mail td, div.mail p {
	background: #fff !important;
	color: #000 !important;
	font-size: 12pt !important;
	font-family: verdana, helvetica,  arial, "sans serif";
	padding: 10px !important;
}

This will style all of the td's and p's in div.mail.

HTH,
David Bindel
-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPV0/Mrwc2umqeOxSEQJjyACfa4pY83i0X6m4kwv8ZwLHtVFa0KMAn1ij
2/nxfiIj8KrsWOKXq3Gf0izq
=5pka
-----END PGP SIGNATURE-----




More information about the thelist mailing list