Question re: CSS priority

Discussion in 'HTML' started by Michael Laplante, Apr 21, 2005.

  1. Does an embedded stylesheet trump an external stylesheet? If a user
    configured their browser to use an external stylesheet, would that supercede
    one embedded by the writer in the original file?

    How about MHT archives? If my MHT file included CSS, could an end-user
    override that with their browser settings?

    M
    Michael Laplante, Apr 21, 2005
    #1
    1. Advertising

  2. Michael Laplante wrote:

    > Does an embedded stylesheet trump an external stylesheet?


    No, the order of the style sheets applies as normal (although style
    *attributes* have maximum specificity).

    > If a user configured their browser to use an external stylesheet, would
    > that supercede one embedded by the writer in the original file?


    User style sheets trump author style sheets.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Apr 21, 2005
    #2
    1. Advertising

  3. Michael Laplante

    Spartanicus Guest

    "Michael Laplante" <> wrote:

    >Does an embedded stylesheet trump an external stylesheet? If a user
    >configured their browser to use an external stylesheet, would that supercede
    >one embedded by the writer in the original file?


    http://www.w3.org/TR/CSS21/cascade.html#cascade

    --
    Spartanicus
    Spartanicus, Apr 21, 2005
    #3
  4. Michael Laplante

    Steve Pugh Guest

    David Dorward <> wrote:
    >Michael Laplante wrote:
    >
    >> If a user configured their browser to use an external stylesheet, would
    >> that supercede one embedded by the writer in the original file?

    >
    >User style sheets trump author style sheets.


    No they don't. user !important rules trump everything but otherwise
    author stylesheets trump user ones.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Apr 21, 2005
    #4
  5. Michael Laplante

    Toby Inkster Guest

    Steve Pugh wrote:

    > No they don't. user !important rules trump everything but otherwise
    > author stylesheets trump user ones.


    style attributes trump even user !important rules.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Apr 24, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. EYEBUZZ

    CSS Priority

    EYEBUZZ, Jan 29, 2004, in forum: HTML
    Replies:
    4
    Views:
    11,016
    Dylan Parry
    Jan 29, 2004
  2. Kelvin Moss

    Priority queue question

    Kelvin Moss, Apr 9, 2008, in forum: C++
    Replies:
    4
    Views:
    421
    Kai-Uwe Bux
    Apr 11, 2008
  3. Replies:
    1
    Views:
    264
  4. Marcel Müller
    Replies:
    3
    Views:
    559
    Marcel Müller
    Apr 27, 2009
  5. richard
    Replies:
    12
    Views:
    753
    dorayme
    Mar 9, 2010
Loading...

Share This Page