Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Easy way to have separate bullet and text color on List?

Reply
Thread Tools

Easy way to have separate bullet and text color on List?

 
 
Eric Pinnell
Guest
Posts: n/a
 
      02-26-2004
Is there an easy way for me to set different colors for my text and
bullets in an unordered list? The only thing I can think of is to
define a style for UL that sets the foreground to one color, then on
the next line do a SPAN or something like that for the text whose
color has to be different.




Eric Pinnell

(Author, "Claws of The Dragon", "The Omega File")

For a preview, see: http://www.ericpinnell.com and click on "books"
 
Reply With Quote
 
 
 
 
Richard
Guest
Posts: n/a
 
      02-26-2004
Eric Pinnell wrote:

> Is there an easy way for me to set different colors for my text and
> bullets in an unordered list? The only thing I can think of is to
> define a style for UL that sets the foreground to one color, then on
> the next line do a SPAN or something like that for the text whose
> color has to be different.


Sure. Set up a different class for each color of text.
<ul class="red">
<ul class="blue">
<ul class="white">



> Eric Pinnell


> (Author, "Claws of The Dragon", "The Omega File")


> For a preview, see: http://www.ericpinnell.com and click on "books"



 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-26-2004
Eric Pinnell <see my web site> wrote:

> Is there an easy way for me to set different colors for my text and
> bullets in an unordered list?


Create an image of a colored bullet and use list-style-image in CSS.

> The only thing I can think of is to
> define a style for UL that sets the foreground to one color, then on
> the next line do a SPAN or something like that for the text whose
> color has to be different.


Yes, that's the other alternative - I don't think there are other
possibilities. (The list bullet is conceptually part of the <li>
element, so the only way to make it have a color different from the
list item text is to wrap that text inside an auxiliary element.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      02-26-2004
"Richard" <anonymous@127.000> wrote:
> Eric Pinnell wrote:
>
> > Is there an easy way for me to set different colors for my text and
> > bullets in an unordered list? The only thing I can think of is to
> > define a style for UL that sets the foreground to one color, then on
> > the next line do a SPAN or something like that for the text whose
> > color has to be different.


Correct, it's either that or using a graphic for the bullet (i.e.
list-style-image property).

>Sure. Set up a different class for each color of text.
><ul class="red">
><ul class="blue">
><ul class="white">


And this makes the text a different colourt to the bullets how?

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
 
Eric Pinnell
Guest
Posts: n/a
 
      02-27-2004
On Thu, 26 Feb 2004 12:52:14 -0600, "Richard" <anonymous@127.000>
wrote:


>Sure. Set up a different class for each color of text.
><ul class="red">
><ul class="blue">
><ul class="white">


That's not what I mean. What I want is to have the bullet be one
color and the text another color on the same line. If I have a link, I
can get away with it, since the link can be defined as a different
color than the foreground color used by the bullet. What happens,
though, if there's text instead of a link?


Eric Pinnell

(Author, "Claws of The Dragon", "The Omega File")

For a preview, see: http://www.ericpinnell.com and click on "books"
 
Reply With Quote
 
Barefoot Kid
Guest
Posts: n/a
 
      02-28-2004
"Eric Pinnell" <see my web site> wrote in message news:...
| Is there an easy way for me to set different colors for my text and
| bullets in an unordered list? The only thing I can think of is to
| define a style for UL that sets the foreground to one color, then on
| the next line do a SPAN or something like that for the text whose
| color has to be different.

have u tried using images as ur bullet points?

ul {
list-style-image: url(images/bullet.gif);
}
---------------------------------------------------
Hung Diep
New Media Designer
www.intro-spect.co.uk
0795 6576 319


 
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
Multi-line TextBox - Paste text with numbered list, bullet list, tab character tony_csnet@yahoo.com ASP .Net Building Controls 0 11-09-2005 07:04 PM
Circle bullet in Bullet Style Al Camp HTML 24 07-31-2005 02:12 PM
Change text color for one document.write but not color of all text? kroger@princeton.edu Javascript 7 02-02-2005 01:23 PM
Cinema.Craft.Encoder.SP.v2.70.01.05, Magic.Bullet.Editor.v.1.01.for.Avid.Xpress.Pro, Magic.Bullet.Editor.v.1.01.for.Premiere.Pro, Magic.Bullet.Editor.v.1.01.for.Sony.Vegas, Avid.Xpress.Pro.HD.v5.0 1CD, Sony.Vegas.v5.0d, ola DVD Video 0 01-14-2005 10:53 AM
How do I keep text indended after a bullet using only div/css? Thomas Watson HTML 19 09-29-2003 06:32 PM



Advertisments