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

Discussion in 'HTML' started by Eric Pinnell, Feb 26, 2004.

  1. Eric Pinnell

    Eric Pinnell Guest

    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"
     
    Eric Pinnell, Feb 26, 2004
    #1
    1. Advertising

  2. Eric Pinnell

    Richard Guest

    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"
     
    Richard, Feb 26, 2004
    #2
    1. Advertising

  3. 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
     
    Jukka K. Korpela, Feb 26, 2004
    #3
  4. Eric Pinnell

    Steve Pugh Guest

    "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/>
     
    Steve Pugh, Feb 26, 2004
    #4
  5. Eric Pinnell

    Eric Pinnell Guest

    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"
     
    Eric Pinnell, Feb 27, 2004
    #5
  6. Eric Pinnell

    Barefoot Kid Guest

    "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
     
    Barefoot Kid, Feb 28, 2004
    #6
    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. KiwiBrian

    Bullet list query

    KiwiBrian, Jun 6, 2005, in forum: HTML
    Replies:
    3
    Views:
    508
    Spartanicus
    Jun 7, 2005
  2. Al Camp

    Circle bullet in Bullet Style

    Al Camp, Jul 30, 2005, in forum: HTML
    Replies:
    24
    Views:
    12,308
    Al Camp
    Jul 31, 2005
  3. Replies:
    0
    Views:
    327
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    434
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    7
    Views:
    380
    Mick White
    Feb 2, 2005
Loading...

Share This Page