order in which css code is placed

Discussion in 'HTML' started by Leslie, Dec 15, 2003.

  1. Leslie

    Leslie Guest

    When writing css code, either in an external stylesheet, or in the
    head of the document, does it make a difference what order the code is
    placed on the page?

    It makes sense to me to put the code in the order in which it will be
    used on the .html page, but I got to wondering tonight if it really
    makes a difference in how the pages loads and/or displays.

    Just curious......

    Thanks,

    Leslie
    "I refuse to have a battle of wits with an unarmed person."
    Leslie, Dec 15, 2003
    #1
    1. Advertising

  2. Leslie

    brucie Guest

    in post <news:>
    Leslie said:

    > When writing css code, either in an external stylesheet, or in the
    > head of the document, does it make a difference what order the code is
    > placed on the page?


    yes http://www.w3.org/TR/REC-CSS2/cascade.html#cascade

    --
    brucie
    15/December/2003 10:57:46 am kilo
    brucie, Dec 15, 2003
    #2
    1. Advertising

  3. Quoth the raven named brucie:

    > in post <news:>
    > Leslie said:
    >
    >
    >>When writing css code, either in an external stylesheet, or in the
    >>head of the document, does it make a difference what order the code is
    >>placed on the page?

    >
    >
    > yes http://www.w3.org/TR/REC-CSS2/cascade.html#cascade


    ...and where cascading is not an issue, I always write alphabetically
    so modification is easier.

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Dec 15, 2003
    #3
  4. Leslie

    brucie Guest

    in post <news:928Db.14567$>
    Beauregard T. Shagnasty said:

    > ..and where cascading is not an issue, I always write alphabetically
    > so modification is easier.


    i write as the rules appear in the page so i know if a class is at the
    bottom of my css its used near the bottom of the html page somewhere or
    vice versa. very hand when you come back to a page 12 months later. i
    also usually use separate files for styles and colors. makes changing
    colors a lot easier.

    --
    brucie
    15/December/2003 11:24:31 am kilo
    brucie, Dec 15, 2003
    #4
  5. brucie wrote:

    > i write as the rules appear in the page so i know if a class is at the
    > bottom of my css its used near the bottom of the html page somewhere or
    > vice versa.


    Ditto, although for a lot of inline styles, they may be used several
    times or not at all on a page and scattered around in lots of places.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Dec 15, 2003
    #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. Pierre-Louis
    Replies:
    8
    Views:
    986
    Bob Efram
    Oct 17, 2003
  2. Deryck
    Replies:
    4
    Views:
    508
    derek giroulle
    Jun 22, 2004
  3. upendra
    Replies:
    0
    Views:
    4,300
    upendra
    Aug 31, 2006
  4. Rod Pemberton
    Replies:
    1
    Views:
    304
    Rod Pemberton
    May 3, 2006
  5. Stephan Kämper
    Replies:
    2
    Views:
    229
    Stephan Kämper
    Jan 18, 2004
Loading...

Share This Page