Web Hosting CSS & Stylesheet Forums

Add Me

User Name
Password
Go Back   CSS & Stylesheet Forums > CSS Forumz: Main > Style Sheet In General

Welcome to the CSS & Stylesheet Forums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags:



Reply
  #1 (permalink)  
Old 08-22-2008, 04:49 PM
Andreas Prilop
Guest
 
Posts: n/a
Diggs:
Default Bold numbers in ordered lists



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?

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
Reply With Quote


Sponsored Links
  #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


  #3 (permalink)  
Old 08-23-2008, 08:33 AM
dorayme
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

In article
<Pine.GSO.4.63.0808221608080.15416@s5b004.rrzn.u ni-hannover.de>,
Andreas Prilop <prilop4321@trashmail.net> 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?


There is a perfectly good way that uses the semantic equivalent of an
ordered list, a two column table, with which your requirement has a
simple solution.

--
dorayme
Reply With Quote


  #4 (permalink)  
Old 08-23-2008, 08:33 AM
Bergamot
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists


Jonathan N. Little wrote:
>
> ol { counter-reset: item --
> ol li { display: block --
> ol li:before {
> content: counter(item) ". ";
> counter-increment: item;
> font-weight: bold;
> color: red;
> --


Nice - and it degrades well for CSS deficient browsers, too.

--
Berg
Reply With Quote


  #5 (permalink)  
Old 08-24-2008, 04:47 PM
jACK
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

Hey Guys.

I've got nothing to do with your problem, but I tried the code.

The colors showed in Firefox, but didn't show in IE 6

Thought you might like to know.

Jack


On Fri, 22 Aug 2008 10:52:40 -0400, "Jonathan N. Little"
<lws4art@central.net> wrote:

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

Reply With Quote


  #6 (permalink)  
Old 08-24-2008, 04:47 PM
Gregor Kofler
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

jACK meinte:

> The colors showed in Firefox, but didn't show in IE 6


Jonathan already mentioned "you-know-who"...

Gregor


--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum
Reply With Quote


  #7 (permalink)  
Old 08-25-2008, 04:29 PM
Andreas Prilop
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

On Sat, 23 Aug 2008, dorayme wrote:

> There is a perfectly good way that uses the semantic equivalent of
> an ordered list, a two column table,


I don't know what you mean by "semantic equivalent" - but I certainly
cannot get automatic numbering in a table.

--
Solipsists of the world - unite!
Reply With Quote


  #8 (permalink)  
Old 08-25-2008, 04:29 PM
Jonathan N. Little
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

Andreas Prilop wrote:
> On Sat, 23 Aug 2008, dorayme wrote:
>
>> There is a perfectly good way that uses the semantic equivalent of
>> an ordered list, a two column table,

>
> I don't know what you mean by "semantic equivalent" - but I certainly
> cannot get automatic numbering in a table.
>


I just love a challenge!


<!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>Ha, ha</title>

<style type="text/css">
table { border: 2px solid black; --
td { border: 1px solid black; --

table { counter-reset: item; --
table tr td:first-child:before {
content: counter(item) ": ";
display: inline;
counter-increment: item;
font-weight: bold;
color: red;
--

</style>

</head>
<body>

<table>
<tr><td>one</td><td>a</td></tr>
<tr><td>two</td><td>b</td></tr>
<tr><td>three</td><td>c</td></tr>
<tr><td>four</td><td>e</td></tr>
<tr><td>five</td><td>f</td></tr>
<tr><td>six</td><td>g</td></tr>
<tr><td>seven</td><td>h</td></tr>
<tr><td>eight</td><td>I</td></tr>
</table>

</body>
</html>

--
Take care,

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


  #9 (permalink)  
Old 08-25-2008, 04:29 PM
Andreas Prilop
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

On Mon, 25 Aug 2008, Jonathan N. Little wrote:

>> I don't know what you mean by "semantic equivalent" - but I certainly
>> cannot get automatic numbering in a table.

>
> content: counter(item) ": ";


In which browser?
Reply With Quote


  #10 (permalink)  
Old 08-25-2008, 04:29 PM
Jonathan N. Little
Guest
 
Posts: n/a
Diggs:
Default Re: Bold numbers in ordered lists

Andreas Prilop wrote:
> On Mon, 25 Aug 2008, Jonathan N. Little wrote:
>
>>> I don't know what you mean by "semantic equivalent" - but I certainly
>>> cannot get automatic numbering in a table.

>> content: counter(item) ": ";

>
> In which browser?


Oh, don't expect it to work in IE!

Firefox, SeaMonkey, Opera... the browser must support css counters.

--
Take care,

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On


© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:01 PM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.




Inactive Reminders By Mished.co.uk