Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Simple Question?

Reply
Thread Tools

Simple Question?

 
 
Gaffer
Guest
Posts: n/a
 
      09-11-2003
How do change the colour of a horizontal line? <hr>

Regards
_____
Gaffer


 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      09-11-2003
Gaffer wrote:

> How do change the colour of a horizontal line? <hr>
>
> Regards
> _____
> Gaffer
>
>

<hr style="color: blue; background-color: blue;">

--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

 
Reply With Quote
 
 
 
 
Richard
Guest
Posts: n/a
 
      09-11-2003
Gaffer wrote:>>

> How do change the colour of a horizontal line? <hr>


> Regards
> _____
> Gaffer


Simple answer.
<hr color="white">
color can be name as shown, "#fff" -hex 8 bit, ""#ffffff" -hex 16 bit, or
"rgb(255,255,255)".



 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      09-11-2003
Gazing into my crystal ball I observed "Richard" <anom@anom> writing in
news:(E-Mail Removed):

> Gaffer wrote:>>
>
> > How do change the colour of a horizontal line? <hr>

>
> > Regards
> > _____
> > Gaffer

>
> Simple answer.
><hr color="white">
> color can be name as shown, "#fff" -hex 8 bit, ""#ffffff" -hex 16 bit, or
> "rgb(255,255,255)".
>
>
>
>


Better:

<hr style="color:#fff">

There is no color attribute for the HR element.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
Sam Hughes
Guest
Posts: n/a
 
      09-11-2003
In article <Xns93F38B10716FCarbpenyahoocom@207.115.63.158>, Adrienne
says...
> Gazing into my crystal ball I observed "Richard" <anom@anom> writing in
> news:(E-Mail Removed):
>
> > Gaffer wrote:>>
> >
> > > How do change the colour of a horizontal line? <hr>

> >
> > Simple answer.
> ><hr color="white">
> > color can be name as shown, "#fff" -hex 8 bit, ""#ffffff" -hex 16 bit, or
> > "rgb(255,255,255)".
> >


First of all, HTML colors can only come in two forms: one of 16 select
color names ("white" is one of them) or a 24-bit hexadecimal number
(#FFFFFF is 24 bit, not 16 bit).

#FFF is only allowed with CSS, whether or not IE still supports it in
HTML attributes. Also, it is 12 bits, not 8. rgb() syntax is also not
valid in HTML attributes; it is only valid in CSS.

Note that a hexidecimal number needs 4 bits (or one nibble) of storage
space to be
stored -- 16 = 2^4. Thus, a number with 6 hexidecimal digits requires 24
bits, while one with 3 hexidecimal digits requires 12 bits.

> Better:
>
> <hr style="color:#fff">
>
> There is no color attribute for the HR element.


And the CSS color property applies to the text color. IE uses the color
property in its demented way; it renders the HR as blue even though HR
elements have no text. Other browsers use the background-color property.

Els's solution of <hr style="color: #fff; background-color: #fff;"> works
better.
 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      09-11-2003
Gazing into my crystal ball I observed Sam Hughes <(E-Mail Removed)>
writing in news:(E-Mail Removed):

> In article <Xns93F38B10716FCarbpenyahoocom@207.115.63.158>, Adrienne
> says...
>> Gazing into my crystal ball I observed "Richard" <anom@anom> writing
>> in news:(E-Mail Removed):
>>
>> > Gaffer wrote:>>
>> >
>> > > How do change the colour of a horizontal line? <hr>
>> >
>> > Simple answer.
>> ><hr color="white">
>> > color can be name as shown, "#fff" -hex 8 bit, ""#ffffff" -hex 16
>> > bit, or "rgb(255,255,255)".
>> >

>
> First of all, HTML colors can only come in two forms: one of 16 select
> color names ("white" is one of them) or a 24-bit hexadecimal number
> (#FFFFFF is 24 bit, not 16 bit).
>
> #FFF is only allowed with CSS, whether or not IE still supports it in
> HTML attributes. Also, it is 12 bits, not 8. rgb() syntax is also not
> valid in HTML attributes; it is only valid in CSS.
>
> Note that a hexidecimal number needs 4 bits (or one nibble) of storage
> space to be
> stored -- 16 = 2^4. Thus, a number with 6 hexidecimal digits requires
> 24 bits, while one with 3 hexidecimal digits requires 12 bits.
>
>> Better:
>>
>> <hr style="color:#fff">
>>
>> There is no color attribute for the HR element.

>
> And the CSS color property applies to the text color. IE uses the
> color property in its demented way; it renders the HR as blue even
> though HR elements have no text. Other browsers use the
> background-color property.
>
> Els's solution of <hr style="color: #fff; background-color: #fff;">
> works better.


Absolutely agree, I think Els' message hadn't reached my news server yet.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      09-12-2003
Sam Hughes wrote:>>

> In article <Xns93F38B10716FCarbpenyahoocom@207.115.63.158>, Adrienne
> says...
>> Gazing into my crystal ball I observed "Richard" <anom@anom> writing in
>> news:(E-Mail Removed):
>>
> >> Gaffer wrote:>>
> >>
> > >> How do change the colour of a horizontal line? <hr>
> >>
> >> Simple answer.
> >><hr color="white">
> >> color can be name as shown, "#fff" -hex 8 bit, ""#ffffff" -hex 16 bit,
> >> or "rgb(255,255,255)".


> First of all, HTML colors can only come in two forms: one of 16 select
> color names ("white" is one of them) or a 24-bit hexadecimal number
> (#FFFFFF is 24 bit, not 16 bit).


Not quite. A single hexadecimal unit is 8 bit. Two units makes it 16 bits.
8 bit is defined by "#000" and 16 by "#010101".




> #FFF is only allowed with CSS, whether or not IE still supports it in
> HTML attributes. Also, it is 12 bits, not 8. rgb() syntax is also not
> valid in HTML attributes; it is only valid in CSS.


It is supported in versions 4 and above. In IE, netscape and mozilla as well
as others.

> Note that a hexidecimal number needs 4 bits (or one nibble) of storage
> space to be
> stored -- 16 = 2^4. Thus, a number with 6 hexidecimal digits requires 24
> bits, while one with 3 hexidecimal digits requires 12 bits.


In using rgb(00,00,00), the 3 sets of values automatically define it as 24
bit.
In the hex format, it is still 24 bit but defined by 3 pairs of values
writtten without the comma.
So technically we should have "#FF,00,FF".
As you should know, 8 bits = 255 possible combinations.
16 bits therefor = 65,005 possible combinations.
So "red" has 65,005 shades.
Although we refer to it as 24 bit "true color", it is not 24 bit in the
formatting. Not yet anyway.



>> Better:
>>
>> <hr style="color:#fff">
>>
>> There is no color attribute for the HR element.


> And the CSS color property applies to the text color. IE uses the color
> property in its demented way; it renders the HR as blue even though HR
> elements have no text. Other browsers use the background-color property.


> Els's solution of <hr style="color: #fff; background-color: #fff;"> works
> better.



 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      09-12-2003
Adrienne wrote:>>

> Gazing into my crystal ball I observed "Richard" <anom@anom> writing in
> news:(E-Mail Removed):


>> Gaffer wrote:>>
>>
> >> How do change the colour of a horizontal line? <hr>

>>
> >> Regards
> >> _____
> >> Gaffer

>>
>> Simple answer.
>><hr color="white">
>> color can be name as shown, "#fff" -hex 8 bit, ""#ffffff" -hex 16 bit,
>> or "rgb(255,255,255)".


> Better:


> <hr style="color:#fff">


> There is no color attribute for the HR element.


Then to tell that to this guy:
http://www.webdiner.com/annexe/hr/hr.htm



 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      09-12-2003
Richard wrote:
> Adrienne wrote:
>
>> There is no color attribute for the HR element.

>
> Then to tell that to this guy:
> http://www.webdiner.com/annexe/hr/hr.htm


All information copyright Web Diner Inc., 1997
^^^^
'Nuff said.

--

Mark Parnell
http://www.clarkecomputers.com.au


 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      09-12-2003

"Richard" <anom@anom> wrote in message
news:(E-Mail Removed)...
> Adrienne wrote:>>
>
> > Gazing into my crystal ball I observed "Richard" <anom@anom> writing in
> > news:(E-Mail Removed):

>
> > There is no color attribute for the HR element.

>
> Then to tell that to this guy:
> http://www.webdiner.com/annexe/hr/hr.htm


<grin />
Yes. We should also tell him this:

http://www.w3.org/TR/html4/present/graphics.html#h-15.3

I see no mention of a color attribute anywhere in the DTD entry for <hr>.

Some brower specific extensions (IE) allow the attribute.

Cheers
Ricahrd.


 
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
Simple VB.Net / webservice requirement (but not simple for me....) Dave E ASP .Net 7 01-11-2006 02:07 PM
Simple Question - Simple Answer? Daniel Frey XML 4 01-12-2005 04:25 PM
Re: Simple Simple question!!! Kevin Spencer ASP .Net 0 06-25-2004 05:25 PM
Re: Simple Simple question!!! ashelley@inlandkwpp.com ASP .Net 0 06-25-2004 04:18 PM
A few simple problems in a simple program. jmac@berkeley.edu C Programming 7 07-23-2003 09:51 PM



Advertisments