Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- CSS Text between Li items
February 27, 2006, 11:04 pm
rate this thread
on the net.
Basically I want it to display like this:
Text1 - Text2 - Text3
I don't have control how the UL and LI elements are rendered, so can is
it possible to use CSS to put some text in between each element. I can
simply make it inline so that it renders like:
Text1 Text2 Text3
But can you use CSS to put in the '-'?
Any help would be greatly appreciated.
Re: CSS Text between Li items
To make those dashes real text, you'd need parts of CSS that are not yet widely
(see "content" property in CSS specs) and are not about to be in the near
You can, however, make that dash with a non-repeating background image on the
LIs. To hide
the first dash, apply some negative margin to LIs (to shift them left) and set
overflow to hidden (to clip off the left part of the leftmost LI).
I've never done this, not even as a test, but it should work.