|
|
 |
RE: FN-FORUM: Overide property in CSS file
date posted 1st March 2004 14:07
!important can be used in a client side style sheet to over-ride remote
style sheets.
Eg blind people may use a style sheet to set the text to 20px black bold so
they can read it.
They use !important on a style sheet on their system so they can override
your css font sizes wherever you specify them.
If you use an !important rule on the remote stylesheet, you will override
the local stylesheet !important rule, which is guaranteed to alienate your
users.
Regards
Ron
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] Behalf Of Cameron
Leask
Sent: 01 March 2004 14:52
To: FN-FORUM / [EMAIL REMOVED]
Subject: RE: FN-FORUM: Overide property in CSS file
>
>
> But strangely putting this in a stylesheet at the top of the
> page did not work.
You've got to do it in the right order.
If you had a stylesheet that said
...
color: red;
color: blue;
...
You'd have blue text. If the stylesheet said
...
color: blue;
color: red;
...
You'd have red text.
The ordering remains important regardless (IIRC) of how or where you define
the style. (ie you can have multiple stylesheets but the order which the
styles are defined remains important).
Accordingly putting the style in the tag takes precedence over
anything else - it's your last possible chance to style the body tag
(without of course using javascript to change it). Can't remember how using
"!important" changes the precedence, sorry, but a half-decent CSS book
should help you figure it out ;>
Cameron
--
** Get all the Freelance Work you Can Handle *
The Web Design Business Kit will show you proven tactics
and strategies for marketing your business, winning bids,
managing projects and pricing your work. Free Shipping Worldwide.
Read more & get free chapters at: http://www.sitepoint.com/launch/b7c91e/3/4
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|