Style html lists with css
|
Author: Mattias (mattias@999tutorials.com) Categories: CSS |
|
|
|
The tutorial: Digg this, Post to del.icio.us, Did you know that you can make some different styling and stuff for the standard lists in html? The standard look is something like this:
And you write the html like this: And if you want it numbered instead it looks like this:
The html looks like this:
But you can also use other symbols instead of the standard bullets in the first example.
And you write the html like this: The different list-style-type for <ul>'s are circle, disc and square(standard). And you can only use one at the time :-)
Pretty similar you can use the ordered mode <ol> and style it differently. This is one example where I use roman numbers which can be pretty neat sometimes.
And you write the html like this: The different list-style-type for <ol>'s are upper-alpha, lower-alpha, upper-roman, lower-roman,and decimal (standard). And you can only use one at the time :-) The lats trick is to use your own images for your lists. Can look pretty cool if you have some graphics for it. I use a stupid little guy that I used in my tutorial about using images in input fields, check it out!
And you write the html like this:
Something to remember is to always use classes instead of writing the css attributes inside your html code like I did here. This was only to make it easier for you to read and follow the tutorial. It's always best to put all your css in a seperate css file and link it inside the html page. Digg this, Post to del.icio.us, |
