On Fri, 2007-05-25 at 13:44 +0300, Jukka K. Korpela wrote:
> On Fri, 25 May 2007, Joanne wrote:
>
> > I have an ordered list, and I want to style the numbers differently to the
> > text. Is this possible?
> >
> > Ie: I want the numbers large and blue, and the text to be small and black.
>
> I'm afraid there is no direct way to achieve that, since the numbers are
> effectively treated as anonymous parts of <li> elements, as far as styling
> is considered.
>
> However, this implies that you can circumvent the restriction by adding
> extra markup for <li> contents. For example, if you write
Not sure how IE copes with it, 6 doesn't, not tried in 7 but I suspect
it won't either. The following definitely works in firefox / konqueror,
and should in opera but opera is crashing on startup for me at the
moment.
ol { counter-reset: mycounter 0; list-style: none }
li:before
{
font-size: 2em;
display: marker;
marker-offset: 3em;
content: counter(mycounter, decimal) ". ";
counter-increment: mycounter;
}
David
--
Make your website SCREEM - Site Creating & Editing EnvironMent
URL: http://www.screem.org/
Mail: [EMAIL PROTECTED]
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/