View Single Post
  #2 (permalink)  
Old 08-22-2008, 04:49 PM
Jonathan N. Little
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

Andreas Prilop wrote:
> To get bold numbers in ordered lists, one can write
>
> ol { font-weight: bold --
> ol span { font-weight: normal --
>
> <ol>
> <li><span>......</span></li>
> <li><span>......</span></li>
> </ol>
>
> Is there a better way?
>

Not that you-know-who will support!

Example here I have also colored them red to emphasize the style...

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="content-language" content="en-us">

<title>template</title>

<style type="text/css">
ol { counter-reset: item --
ol li { display: block --
ol li:before {
content: counter(item) ". ";
counter-increment: item;
font-weight: bold;
color: red;
--
</style>
</head>
<body>

<ol>
<li>fee</li>
<li>fie</li>
<li>foe</li>
<li>fum</li>
</ol>
</body>
</html>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Reply With Quote