Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Problems with numbered lists that use css

Reply
Thread Tools

Problems with numbered lists that use css

 
 
Dave Rado
Guest
Posts: n/a
 
      05-06-2004
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




 
Reply With Quote
 
 
 
 
Lauri Raittila
Guest
Posts: n/a
 
      05-06-2004
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ä
 
Reply With Quote
 
 
 
 
Mitja
Guest
Posts: n/a
 
      05-06-2004
Lauri Raittila <(E-Mail Removed)>
(news:(E-Mail Removed) et) 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">...


 
Reply With Quote
 
Lauri Raittila
Guest
Posts: n/a
 
      05-06-2004
In article Mitja wrote:
> Lauri Raittila <(E-Mail Removed)>
> (news:(E-Mail Removed) et) 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ä
 
Reply With Quote
 
Mitja
Guest
Posts: n/a
 
      05-06-2004
Lauri Raittila <(E-Mail Removed)>
(news:(E-Mail Removed) et) wrote:
> In article Mitja wrote:
>> Lauri Raittila <(E-Mail Removed)>
>> (news:(E-Mail Removed) et) 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).


 
Reply With Quote
 
Dave Rado
Guest
Posts: n/a
 
      05-06-2004
Hi Lauri

"Lauri Raittila" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) t...

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


 
Reply With Quote
 
Dave Rado
Guest
Posts: n/a
 
      05-06-2004
Hi Mitja and Lauri

"Mitja" <(E-Mail Removed)> wrote in message
news:c7dkcg$9n9$(E-Mail Removed)...

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


 
Reply With Quote
 
C A Upsdell
Guest
Posts: n/a
 
      05-06-2004
"Dave Rado" <(E-Mail Removed)> wrote in message
news:c7e1jc$4ro$(E-Mail Removed)...

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


 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      05-06-2004
Lauri Raittila wrote:

> .Callout {color:0000FF;}


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

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Dave Rado
Guest
Posts: n/a
 
      05-07-2004
"C A Upsdell" <cupsdell0311XXX@-@(E-Mail Removed)> 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


 
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
removing indent from numbered lists donny HTML 2 08-08-2006 07:29 AM
List of lists of lists of lists... =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==?= Python 5 05-15-2006 11:47 AM
These *^&*%&*(&% numbered LISTS!! Mara Computer Support 6 12-13-2004 08:44 PM
A program to make numbered lists? James Haddow Computer Support 8 02-27-2004 05:15 AM
A program to make a numbered list? Metaphor Computer Support 5 02-26-2004 04:44 PM



Advertisments