Pages Menu
TwitterRssFacebook
Categories Menu

Posted by on Nov 21, 2009 in CSS | 0 comments

Ordered List Styling Using CSS

Ordered List Styling Using CSS

We’ve addressed unordered lists but haven’t really done much with the ordered ones. What’s the difference? Well, unordered lists use bullets and ordered list use numbers. They both use the <li> tag but start differently with the unordered being <ul> while the ordered is <ol>. Without using any styling for the ordered list you get that ugly set of numbers that label each list item. Using a little bit of styling produces much better results. Check it out – this is standard list display:
  1. blah blah
  2. blah blah blahhhh
  3. blah blah blahhhhhh
Now, with some style use in our CSS we can come up with something like this:
  1. blah blah

  2. blah blahhh

  3. blah blah blahhhhhhhhhh

Here’s the CSS:
ol {

font: italic 1em Georgia, Times, serif;

color: #999999;

}

ol p {

font: normal .8em Arial, Helvetica, sans-serif;

color: #000000;

}
And the HTML:
<ol>
	<li>

This is line one</li>
	<li>

Here is line two</li>
	<li>

And last line</li>
</ol>

You must log in to post a comment.

Wordpress Special! Get 1 year of hosting on our powerful dual-processor servers + your choice from 75 premium themes at one low price!
Full Details!
Don't settle for slow servers and cheap hosting for your Wordpress site! Our servers are optimized for Wordpress based sites. Get your site up and running quickly on our dual-processor cPanel based servers for fast page loads!
Full details and ordering...
%d bloggers like this: