![]() |
|
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: |
![]() |
|
|||
|
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 |
| Sponsored Links |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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> |
|
|||
|
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 |
|
|||
|
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! |
|
|||
|
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 |
|
|||
|
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? |
|
|||
|
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 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
- Contact Us
-|-
CSS & Stylesheet Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise