Topic: Styling lists is driving me nuts! (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Kansas City, MO , USA |
posted 06-04-2005 07:29
Ok, I am trying to style some lists... Here is the code: code: <ul> <li class="page_item"><a href="#" title="Something...">Blah</a></li> <li class="page_item"><a href="#" title="Something...">Blah</a></li> <li class="page_item"><a href="#" title="Something...">Blah</a></li> <li class="page_item"><a href="#" title="Something...">Blah</a></li> <li class="page_item"><a href="#" title="Something...">Blah</a></li> </ul>
code: .page_item li{ list-style-image: url('bullet-off.png'); }
|
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 06-04-2005 07:58 |
Paranoid (IV) Inmate From: Florida |
posted 06-04-2005 08:07
also iirc it's simpler to get cross-browser sameness if you specify ul { list-style: none; } and just give the anchors in the list items background images on the left |
Maniac (V) Inmate From: under the bed |
posted 06-04-2005 14:21
Yeah, a background image generally gives a whole lot better results. |
Bipolar (III) Inmate From: Kansas City, MO , USA |
posted 06-04-2005 17:20 |
Paranoid (IV) Mad Scientist From: Inside THE BOX |
posted 06-05-2005 18:58
Incidentally, I think I would follow Slime's "for instance" and get all those class declarations out of your <li>'s. It's far easier to write your classes as few times as possible. code: ul.page_item li { styles } <ul class="page_item"> <li>Item</li> <li>Item</li> <li>Item</li> </ul>
code: li.page_item { styles } <ul> <li class="page_item">Item</li> <li class="page_item">Item</li> <li class="page_item">Item</li> </ul>
|
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 06-22-2005 16:32
quote:
|
Maniac (V) Inmate From: there...no..there..... |
posted 06-30-2005 20:23
quote:
|