|
|
|
READERS LIKE YOU! Support TidBITS with a contribution today! <http://www.tidbits.com/about/support/contributors.html> Special thanks this week to John O'Shaughnessy, Bob Dolan, Robin S. Armstrong, and David M. Douds for their generous support! |
Use Custom CSS to Tweak TidBITS Display
via email
Re: <http://db.tidbits.com/article/9227>
There's a risk that some other site uses the same class names "head_primary"
and "head_secondary". In your proposed solution the user's Style Sheet would
affect those cases also, not just the TidBITS site.
Ideally, web browsers would allow users to define exactly which site(s) a
particular User Style Sheet should be applied to. Unfortunately they still
don't (browser vendors are still spending half their time making broking web
sites 'work'). A poor man's workaround is for web publishers to set an id on
the <body> element, which provides users with a reasonably reliable method to
write User CSS that targets a specific site only.
The convention is to have the id consist of the site's domain name, replacing
periods with hypens. Thus: <body id="tidbits-com">
The User CSS Style Sheet can then read:
body#tidbits-com .head_primary, body#tidbits-com .head_secondary
{text-transform: uppercase}
HTH
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
Mark as Read
|
| ||||||||||||||||||||||||||||||
|
TidBITS
TidBITS
TidBITS Talk
Use Custom CSS to Tweak TidBITS Display
