Sent by Richard York on 7 September 2004 07:07
Officelink wrote:
> Hi,
>
> I¹m in the process of putting together a site using tables for layout and
> CSS for the styling. I¹m designing on a Mac but apparently IE for windows
> right up to IE 6 ignores font styles in tables. Can someone tell me how I
> can style my text in tables using CSS if this is the case or if there¹s any
> workaround.
Everyone has there own techniques I suppose, personally I like to use
the universal selector for these sorts of quandaries. The universal
selector (by itself) can be used to select every element on a page.
Here's what a rule using this selector looks like:
* {
font-family: Arial Helvetica sans-serif;
}
So this applies to your tables as well as /everything/ else on the page.
The universal selector has a specificity of zero, so that means that if
you apply font properties with a more specifc selector, suchas:
table {
font-family: "Time New Roman" Times serif;
}
That selector beats the universal selector per the cascade, since it has
a higher specificity, and the font defined with the table selector wins.
I like this technique because it applies to everything on the page, even
in browsers like IE 5 and 5.5 that don't honor inheritance in tables. Of
course it's just as easy to repeat the font declarations for tables,
just depends on what you prefer.
Does that make sense?
HTH!
--
Richard York
------------------------------------------------------------------------
[richy[<@>]smilingsouls[<@>]net] :: [http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/