Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How Does This Work

Reply
Thread Tools

How Does This Work

 
 
Wayne Wengert
Guest
Posts: n/a
 
      02-20-2004
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


 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      02-20-2004
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.

 
Reply With Quote
 
 
 
 
Wayne Wengert
Guest
Posts: n/a
 
      02-20-2004
Els;

Thanks. I never knew that.

Wayne

"Els" <> wrote in message
news:4035fcf9$0$41763$ i.nl...
> 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.
>



 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      02-20-2004
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.


 
Reply With Quote
 
Sid Ismail
Guest
Posts: n/a
 
      02-20-2004
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

 
Reply With Quote
 
Dennis M. Marks
Guest
Posts: n/a
 
      02-26-2004
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! =-----
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      02-26-2004
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
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      02-27-2004
"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/>
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      02-27-2004

"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.


 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      02-27-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS work around on text wrapping in a datagrid does not work TB ASP .Net 2 02-22-2006 10:34 PM
Loop Does'nt Work, Hard code does Nick L C++ 10 08-31-2004 08:49 PM
Why does this (very simple piece of) code does not work? jblazi Python 5 08-16-2004 01:30 PM
int('2.1') does not work while int(float('2.1')) does Vineet Jain Python 9 04-16-2004 10:12 AM
what does the native keyword do actually ? and how does it work ?when we can use it ? Alek Nazarian Java 7 10-22-2003 04:33 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57