From: Lila Duncan on
Hi, I'm working in Dreamweaver CS4.
Please can anyone explain to me how, if embedded CSS rules take priority
over linked stylesheet rules why does it matter and cause potential
problems if, in the CSS Styles Panel list, the embedded stylesheet rules
are listed above the linked stylesheet rules?
Does this mean that their order in the panel listing actually changes their
order of priority despite the traditional and pre-existing CSS hierarchy?
--
Kind regards,
Lila Duncan

--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: GilY on
On Jan 28, 5:24 am, Lila Duncan <LilaDun...(a)privacy.net> wrote:
> Hi, I'm working in Dreamweaver CS4.
> Please can anyone explain to me how, if embedded CSS rules take priority
> over linked stylesheet rules why does it matter and cause potential
> problems if, in the CSS Styles Panel list, the embedded stylesheet rules
> are listed above the linked stylesheet rules?
> Does this mean that their order in the panel listing actually changes their
> order of priority despite the traditional and pre-existing CSS hierarchy?

Lila,

I don't know if this is the answer, but the order that Dreamweaver
lists the rules would not have anything to do with how the rules are
interpreted by a browser, but it may be that Dreamweaver does not
treat embedded rules in the same way that a browser does. It may give
rules of equal specificity greater priority if it is last in order,
even if it is in a linked style sheet. I wouldn't be surprised if
browsers interpret that differently too.

By placing the links before the embedded rules you would insure that
Dreamweaver and browsers interpret the precedence of the rules
similarly.

Gil
From: Eric Wilson on
On Jan 28, 5:24 am, Lila Duncan <LilaDun...(a)privacy.net> wrote:
> Hi, I'm working in Dreamweaver CS4.
> Please can anyone explain to me how, if embedded CSS rules take priority
> over linked stylesheet rules why does it matter and cause potential
> problems if, in the CSS Styles Panel list, the embedded stylesheet rules
> are listed above the linked stylesheet rules?
> Does this mean that their order in the panel listing actually changes their
> order of priority despite the traditional and pre-existing CSS hierarchy?
> --
> Kind regards,
> Lila Duncan
>
> --- news://freenews.netfront.net/ - complaints: n...(a)netfront.net ---

The inheritance is dictated by the order the rule is encountered (last
rule encountered is dominant), if your include to the external style
sheet comes prior to your embedded style block then the embedded block
takes precedence (if the external comes after the embedded then it
takes precedence). The "!important" attribute can be used to modify
this order of inheritance.

Generally you include your external style sheets prior to any embedded
CSS, if you do include externals first it causes the following
behavior:

External CSS files serve as the foundation (in the order they are
included if more than 1).
Embedded CSS block adds to or modifies the external sheet
Inline CSS adds to or modifies the External & Embedded CSS
User provided style sheet comes in last and modifies all of the above





 | 
Pages: 1
Prev: ecommerce
Next: Remember Dreamweaver UltraDev?