CSS Constant

Discussion in 'HTML' started by Chris Leonard, Sep 20, 2003.

  1. Anyone know if it's possible to use a constant within your style sheet ?

    For example.

    I am making use of a few items which I want to have the same background
    color or start at the same point from the left margin. It would be useful to
    define these values at the top of the sheet and refer to the constant name
    below.

    var MyBGCol: #FFFFFF;

    body
    {
    background-color MyBGCol;
    }

    li
    {
    background-color MyBGCol;
    }

    Is it possible ?

    TIA

    Chris
     
    Chris Leonard, Sep 20, 2003
    #1
    1. Advertising

  2. Chris Leonard

    brucie Guest

    In post <bkhsh4$51b$>
    Chris Leonard said...

    > Anyone know if it's possible to use a constant within your style sheet ?


    use your favorite scripting language to stick the variable in at the
    appropriate places. send file as text/css or just group all elements
    in your css that share common css properties.

    p,#blah,.blah{color:red;}
     
    brucie, Sep 20, 2003
    #2
    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. Christopher M. Lusardi
    Replies:
    1
    Views:
    4,132
  2. Martin Magnusson
    Replies:
    2
    Views:
    534
    John Harrison
    Oct 8, 2004
  3. Tor Erik Soenvisen
    Replies:
    14
    Views:
    591
    Tim Roberts
    Nov 23, 2006
  4. Replies:
    4
    Views:
    357
    Keith Thompson
    Dec 14, 2006
  5. Replies:
    13
    Views:
    13,028
    Kai-Uwe Bux
    Jan 22, 2007
Loading...

Share This Page