How Does This Work

Discussion in 'HTML' started by Wayne Wengert, Feb 20, 2004.

  1. When a css statement such as the following is executed what really happens
    to the color:

    background-color: #cff;

    I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how the
    above works?

    TIA

    Wayne
     
    Wayne Wengert, Feb 20, 2004
    #1
    1. Advertising

  2. Wayne  Wengert

    Els Guest

    Wayne Wengert wrote:

    > When a css statement such as the following is executed what really happens
    > to the color:
    >
    > background-color: #cff;
    >
    > I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how the
    > above works?


    #cff is just short for #ccffff

    It's better to use the full version in some cases, but I
    think it generally doesn't make a difference.
    And in for example #c0f5a4 you can't make a 3 digit version,
    of course.



    --
    Els

    Mente humana é como pára-quedas; funciona melhor aberta.
     
    Els, Feb 20, 2004
    #2
    1. Advertising

  3. Els;

    Thanks. I never knew that.

    Wayne

    "Els" <> wrote in message
    news:4035fcf9$0$41763$...
    > Wayne Wengert wrote:
    >
    > > When a css statement such as the following is executed what really

    happens
    > > to the color:
    > >
    > > background-color: #cff;
    > >
    > > I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how

    the
    > > above works?

    >
    > #cff is just short for #ccffff
    >
    > It's better to use the full version in some cases, but I
    > think it generally doesn't make a difference.
    > And in for example #c0f5a4 you can't make a 3 digit version,
    > of course.
    >
    >
    >
    > --
    > Els
    >
    > Mente humana é como pára-quedas; funciona melhor aberta.
    >
     
    Wayne Wengert, Feb 20, 2004
    #3
  4. Wayne  Wengert

    Richard Guest

    Wayne Wengert wrote:

    > When a css statement such as the following is executed what really
    > happens to the color:


    > background-color: #cff;


    > I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how
    > the above works?


    > TIA


    > Wayne


    The css has to be coded differently than the html version which is basically
    the same thing.
    Instead of "background-color:" you can also use just "background:"
    In the html version the bg means background.
    The colon replaces the =" ".

    In css, many of the key words having hyphens, can be shortened to the main
    word.
    Background-color becomes background.
    Margin-left becomes margin.
    Padding-left becomes padding.


    Background: has 5 subelements.
    Each of the 5 elements can be placed after background: seperating each with
    a space.

    Background: #abc url("images/file.jpg") top center fixed;

    What I just did was make the background a certain color, then place an image
    on it and position it at the top center of the page, and making it stay
    there when the page is scrolled by the user.
    It's a shortcut to having to code a new line for each element.

    http://www.stoneware.dk/english/default.htm

    This editor has a complete library of html, javascript and css elements and
    attributes.
     
    Richard, Feb 20, 2004
    #4
  5. Wayne  Wengert

    Sid Ismail Guest

    On Fri, 20 Feb 2004 05:14:32 -0700, "Wayne Wengert" <>
    wrote:

    : When a css statement such as the following is executed what really happens
    : to the color:
    :
    : background-color: #cff;
    :
    : I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how the
    : above works?


    cff = ccffff
    abc = aabbcc

    Sid
     
    Sid Ismail, Feb 20, 2004
    #5
  6. I have read the following message from "Wayne Wengert"
    <>
    and have decided to lend my vast knowledge.

    The writer said:
    > When a css statement such as the following is executed what really happens
    > to the color:
    >
    > background-color: #cff;
    >
    > I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how the
    > above works?
    >
    > TIA
    >
    > Wayne
    >
    >
    >


    and my reply is:
    Leading zeros have been dropped as in the decimal system. #cff = #000cff

    If you are asking how it PHYSICALLY works, who knows? Logically it is
    the same except you can group all specifications.

    --
    Dennis M. Marks
    http://www.dcs-chico.com/~denmarks/
    Replace domain.invalid with dcsi.net


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis M. Marks, Feb 26, 2004
    #6
  7. Wayne  Wengert

    Mark Parnell Guest

    On Thu, 26 Feb 2004 15:44:18 -0800, "Dennis M. Marks"
    <> declared in alt.html:

    > Leading zeros have been dropped as in the decimal system. #cff = #000cff


    No they haven't. The 3-digit hex codes are the same as the 6 digit code,
    where each of the digits in the 3-digit code is 2 digits in the 6-digit
    code.

    E.g. #cff = #ccffff
    #aaa = #aaaaaa
    #123 = #112233
    #00a = #0000aa

    etc.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Feb 26, 2004
    #7
  8. Wayne  Wengert

    Steve Pugh Guest

    "Dennis M. Marks" <> wrote:
    >I have read the following message from "Wayne Wengert"
    ><>
    >and have decided to lend my vast knowledge.


    Is this deliberate irony?

    >> When a css statement such as the following is executed what really happens
    >> to the color:
    >>
    >> background-color: #cff;
    >>
    >> I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how the
    >> above works?

    >
    >Leading zeros have been dropped as in the decimal system. #cff = #000cff


    That is completely wrong. Please check the specs and actually learn a
    bit about CSS instead of posting rubbish like this. Or are you just
    trolling?

    As several other people have already posted, #cff = #ccffff which is a
    very different colour to #000cff.

    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, Feb 27, 2004
    #8
  9. Wayne  Wengert

    rf Guest

    "Dennis M. Marks" <> wrote in message
    news:260220041544180936%...
    > I have read the following message from "Wayne Wengert"
    > <>
    > and have decided to lend my vast knowledge.
    >
    > The writer said:
    > > When a css statement such as the following is executed what really

    happens
    > > to the color:
    > >
    > > background-color: #cff;
    > >
    > > I am used to colors specified as bgcolor = "#xxxxxx" and am not sure how

    the
    > > above works?

    >
    > and my reply is:


    Why do you keep saying this? It is obvious that this is your reply :)

    > Leading zeros have been dropped as in the decimal system. #cff = #000cff


    Nope. See other replies in this thread. #cff == #ccffff, as in #123 ==
    #112233.

    > If you are asking how it PHYSICALLY works, who knows?


    See above.

    Cheers
    Richard.
     
    rf, Feb 27, 2004
    #9
  10. Wayne  Wengert

    Mark Parnell Guest

    On Fri, 27 Feb 2004 00:11:57 +0000, Steve Pugh <> declared
    in alt.html:
    > "Dennis M. Marks" <> wrote:
    >>I have read the following message from "Wayne Wengert"
    >><>
    >>and have decided to lend my vast knowledge.

    >
    > Is this deliberate irony?


    I noticed that, but I made myself refrain from commenting on it. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Feb 27, 2004
    #10
  11. Wayne  Wengert

    Steve Pugh Guest

    Mark Parnell <> wrote:
    >On Fri, 27 Feb 2004 00:11:57 +0000, Steve Pugh <> declared
    >in alt.html:
    >> "Dennis M. Marks" <> wrote:
    >>>I have read the following message from "Wayne Wengert"
    >>><>
    >>>and have decided to lend my vast knowledge.

    >>
    >> Is this deliberate irony?

    >
    >I noticed that, but I made myself refrain from commenting on it. :)


    Sometimes silence is taken as approval. :-(

    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, Feb 27, 2004
    #11
  12. I have read the following message from Mark Parnell
    <>
    and have decided to lend my vast knowledge.

    The writer said:
    > On Thu, 26 Feb 2004 15:44:18 -0800, "Dennis M. Marks"
    > <> declared in alt.html:
    >
    > > Leading zeros have been dropped as in the decimal system. #cff = #000cff

    >
    > No they haven't. The 3-digit hex codes are the same as the 6 digit code,
    > where each of the digits in the 3-digit code is 2 digits in the 6-digit
    > code.
    >
    > E.g. #cff = #ccffff
    > #aaa = #aaaaaa
    > #123 = #112233
    > #00a = #0000aa
    >
    > etc.
    >
    > --
    > Mark Parnell
    > http://www.clarkecomputers.com.au
    >


    and my reply is:
    After further research I have to admit that you are right. This seems
    to be a standard that was set up to create shorter color codes. The hex
    values are not "mathematically equal" but they represent the same
    color. The 6-digit colors give you more control but 3-digit colors are
    good enough for the web.

    --
    Dennis M. Marks
    http://www.dcs-chico.com/~denmarks/
    Replace domain.invalid with dcsi.net


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis M. Marks, Feb 27, 2004
    #12
  13. Wayne  Wengert

    Mark Parnell Guest

    On Fri, 27 Feb 2004 00:30:58 +0000, Steve Pugh <> declared
    in alt.html:

    > Sometimes silence is taken as approval. :-(


    Sometimes. Mind you this is the first time I have seen anyone comment on
    it (not just in this thread).

    Hopefully I have made my position clear now. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Feb 27, 2004
    #13
    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. TB
    Replies:
    2
    Views:
    3,750
  2. Alek Nazarian
    Replies:
    7
    Views:
    3,235
    Alek Nazarian
    Oct 22, 2003
  3. Nick L
    Replies:
    10
    Views:
    598
    Jerry Coffin
    Aug 31, 2004
  4. Vineet Jain
    Replies:
    9
    Views:
    450
    Fredrik Lundh
    Apr 16, 2004
  5. jblazi
    Replies:
    5
    Views:
    440
    jblazi
    Aug 16, 2004
Loading...

Share This Page