Problems with numbered lists that use css

Discussion in 'HTML' started by Dave Rado, May 6, 2004.

  1. Dave Rado

    Dave Rado Guest

    Hi

    1) I want the numbers in my numbered lists to be in bold, but not the
    text; is there any way of achieving that if the numbered list uses <ol><li>
    tags?

    2) Generally, (e.g. when I use the <p> tag), my text is black; but sometimes
    I use coloured text - e.g.
    p.Callout {color:0000FF;}

    But if I apply <ol><li> tags within the coloured text, e.g.:
    <ol><li><p class="Callout">
    the numbers are black, whereas I want them to be coloured;
    is there any way of achieving this?

    Regards

    Dave
     
    Dave Rado, May 6, 2004
    #1
    1. Advertising

  2. In article Dave Rado wrote:
    > Hi
    >
    > 1) I want the numbers in my numbered lists to be in bold, but not the
    > text; is there any way of achieving that if the numbered list uses <ol><li>
    > tags?


    I think

    li {font-weight:bold}

    Problem is that content will be bolded too.

    > 2) Generally, (e.g. when I use the <p> tag), my text is black; but sometimes
    > I use coloured text - e.g.
    > p.Callout {color:0000FF;}
    >
    > But if I apply <ol><li> tags within the coloured text, e.g.:
    > <ol><li><p class="Callout">
    > the numbers are black, whereas I want them to be coloured;
    > is there any way of achieving this?


    ..Callout {color:0000FF;}
    <ol><li class="Callout"><p>

    Only tested in Opera, not sure if same in every browser.

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    I'm looking for work | Etsin työtä
     
    Lauri Raittila, May 6, 2004
    #2
    1. Advertising

  3. Dave Rado

    Mitja Guest

    Lauri Raittila <>
    (news:) wrote:
    > In article Dave Rado wrote:
    >> Hi
    >>
    >> 1) I want the numbers in my numbered lists to be in bold, but not the
    >> text; is there any way of achieving that if the numbered list uses
    >> <ol><li> tags?

    >
    > I think
    >
    > li {font-weight:bold}
    >
    > Problem is that content will be bolded too.


    Sure, but it can be overridden:
    <ol><li><p style="font-weight:normal">...
     
    Mitja, May 6, 2004
    #3
  4. In article Mitja wrote:
    > Lauri Raittila <>
    > (news:) wrote:
    > > In article Dave Rado wrote:
    > >> Hi
    > >>
    > >> 1) I want the numbers in my numbered lists to be in bold, but not the
    > >> text; is there any way of achieving that if the numbered list uses
    > >> <ol><li> tags?


    > > li {font-weight:bold}
    > >
    > > Problem is that content will be bolded too.

    >
    > Sure, but it can be overridden:
    > <ol><li><p style="font-weight:normal">...


    But then you have more than just <ol><li> tags

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    I'm looking for work | Etsin työtä
     
    Lauri Raittila, May 6, 2004
    #4
  5. Dave Rado

    Mitja Guest

    Lauri Raittila <>
    (news:) wrote:
    > In article Mitja wrote:
    >> Lauri Raittila <>
    >> (news:) wrote:
    >>> In article Dave Rado wrote:
    >>>> Hi
    >>>>
    >>>> 1) I want the numbers in my numbered lists to be in bold, but not
    >>>> the text; is there any way of achieving that if the numbered list
    >>>> uses <ol><li> tags?

    >
    >>> li {font-weight:bold}
    >>>
    >>> Problem is that content will be bolded too.

    >>
    >> Sure, but it can be overridden:
    >> <ol><li><p style="font-weight:normal">...

    >
    > But then you have more than just <ol><li> tags


    Yep, never said it was clean.
    Still, from whot OP wrote ("But if I apply <ol><li> tags within the
    coloured text, e.g.: <ol><li><p class="Callout">..."), I suppose he already
    uses the <p>'s so it is not much of a fuss to implement it.

    There is also a pure css solution, but poorly supported and bound to change
    in future versions of css (see w3c).
     
    Mitja, May 6, 2004
    #5
  6. Dave Rado

    Dave Rado Guest

    Hi Lauri

    "Lauri Raittila" <> wrote in message
    news:...

    | > 2) Generally, (e.g. when I use the <p> tag), my text is black; but
    sometimes
    | > I use coloured text - e.g.
    | > p.Callout {color:0000FF;}
    | >
    | > But if I apply <ol><li> tags within the coloured text, e.g.:
    | > <ol><li><p class="Callout">
    | > the numbers are black, whereas I want them to be coloured;
    | > is there any way of achieving this?
    |
    | .Callout {color:0000FF;}
    | <ol><li class="Callout"><p>
    |
    | Only tested in Opera, not sure if same in every browser.

    That doesn't work in IE when I try it. Does anyone know of a way that does
    work in IE?

    Regards

    Dave
     
    Dave Rado, May 6, 2004
    #6
  7. Dave Rado

    Dave Rado Guest

    Hi Mitja and Lauri

    "Mitja" <> wrote in message
    news:c7dkcg$9n9$...

    | >>>> 1) I want the numbers in my numbered lists to be in bold, but not
    | >>>> the text; is there any way of achieving that if the numbered list
    | >>>> uses <ol><li> tags?
    | >
    | >>> li {font-weight:bold}
    | >>>
    | >>> Problem is that content will be bolded too.

    My text needs to default to normal weight (but with the occasional word
    bolded for emphasis).


    | >> Sure, but it can be overridden:
    | >> <ol><li><p style="font-weight:normal">...
    | >
    | > But then you have more than just <ol><li> tags
    |
    | Yep, never said it was clean.
    | Still, from whot OP wrote ("But if I apply <ol><li> tags within the
    | coloured text, e.g.: <ol><li><p class="Callout">..."), I suppose he
    already
    | uses the <p>'s so it is not much of a fuss to implement it.

    I use <p> tags for lists in which the text is coloured or needs to have a
    style applied using "Class="", but not otherwise; and I think I would find
    it a nightmare to have to use it for *all* numbered lists (most of which
    *don't* have a style applied). I suspect it would be much easier just to use
    manually typed numbering in tables for my coloured lists (which are much
    less frequently used than the normal ones). I'd hoped to be able to use <li>
    tags, but at least tables work..


    | There is also a pure css solution, but poorly supported and bound to
    change
    | in future versions of css (see w3c).

    Oh well. If anyone else comes up with a brainwave, please let me know.

    Thanks and regards

    Dave
     
    Dave Rado, May 6, 2004
    #7
  8. Dave Rado

    C A Upsdell Guest

    "Dave Rado" <> wrote in message
    news:c7e1jc$4ro$...

    > | > 2) Generally, (e.g. when I use the <p> tag), my text is black; but
    > sometimes
    > | > I use coloured text - e.g.
    > | > p.Callout {color:0000FF;}
    > | >
    > | > But if I apply <ol><li> tags within the coloured text, e.g.:
    > | > <ol><li><p class="Callout">
    > | > the numbers are black, whereas I want them to be coloured;
    > | > is there any way of achieving this?
    > |
    > | .Callout {color:0000FF;}
    > | <ol><li class="Callout"><p>
    > |
    > | Only tested in Opera, not sure if same in every browser.
    >
    > That doesn't work in IE when I try it. Does anyone know of a way that does
    > work in IE?


    The examples lack the '#' character which should precede the colour codes.
     
    C A Upsdell, May 6, 2004
    #8
  9. Toby A Inkster, May 6, 2004
    #9
  10. Dave Rado

    Dave Rado Guest

    "C A Upsdell" <cupsdell0311XXX@-@> wrote in message
    news:Mjwmc.430482
    | > | .Callout {color:0000FF;}
    | > | <ol><li class="Callout"><p>
    | > |
    | > | Only tested in Opera, not sure if same in every browser.
    | >
    | > That doesn't work in IE when I try it. Does anyone know of a way that
    does
    | > work in IE?
    |
    | The examples lack the '#' character which should precede the colour codes.


    It's the
    <ol><li class="Callout"><p>

    bit that doesn't work in IE when I try it (the number remains black,
    although the text is coloured). My css file is set up correctly.

    Regards

    Dave
     
    Dave Rado, May 7, 2004
    #10
  11. Dave Rado

    Dave Rado Guest

    "Toby A Inkster" <> wrote in message
    news:p...
    | Lauri Raittila wrote:
    |
    | > .Callout {color:0000FF;}
    |
    | You missed a hash.
    | .Callout {color:#0000FF;}

    That's not the issue though.

    Regards

    Dave
     
    Dave Rado, May 7, 2004
    #11
  12. In article Toby A Inkster wrote:
    > Lauri Raittila wrote:
    >
    > > .Callout {color:0000FF;}

    >
    > You missed a hash.
    > .Callout {color:#0000FF;}


    Yes, careless copy paste (tested with different color, and just copy-
    pasted the old code). But wont solve problem in IE. OP could try
    <ol class="Callout">...

    --
    Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
    I'm looking for work | Etsin työtä
     
    Lauri Raittila, May 7, 2004
    #12
  13. Dave Rado

    Dave Rado Guest

    Hi Lauri

    "Lauri Raittila" <> wrote in message
    news:...

    | OP could try
    | <ol class="Callout">...

    That doesn't work in IE when I try it either.

    Does anyone who has access to IE have any ideas (other than using manually
    typed numbering and tables)?

    Regards

    Dave
     
    Dave Rado, May 10, 2004
    #13
  14. Dave Rado

    Mark Parnell Guest

    On Mon, 10 May 2004 18:44:29 +0100, "Dave Rado" <>
    declared in alt.html:

    > Does anyone who has access to IE have any ideas (other than using manually
    > typed numbering and tables)?


    Applying the class to either the <li> or the <ol> elements works here
    (IE6, Win2k).

    URL?

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, May 11, 2004
    #14
    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. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    410
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  2. donny
    Replies:
    2
    Views:
    8,920
    Toby Inkster
    Aug 8, 2006
  3. Replies:
    24
    Views:
    691
    CBFalconer
    Jun 9, 2006
  4. Replies:
    0
    Views:
    227
  5. jalina

    Numbered class

    jalina, Apr 21, 2006, in forum: C++
    Replies:
    3
    Views:
    295
    Fei Liu
    Apr 21, 2006
Loading...

Share This Page