SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: colors in css

  1. #1
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    colors in css

    Should you use the # in the css to describe colors of not?

    ffffff or #ffffff

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't believe you have to, but it's a good idea to get into the habit. I know you have to in XML and XHTML and that will be fast beocming the standards. Use it to be safe.

    Sketch
    Aaron Brazell
    Technosailor



  3. #3
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, you need it to indicate the format is hexadecimal

    Code:
    <style>
     BODY {color:#eaeaea}
    </style>

  4. #4
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are other possibilities, for example
    Code:
    BODY { color: #f00 }         /* #rgb */
    BODY { color: #ff0000 }    /* #rrggbb */
    BODY { color: rgb(255,0,0) }
    BODY { color: rgb(100%, 0%, 0%) }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •