Issue
Is there a way to create a list-style in HTML with a dash (i.e. - or – – or — —) i.e.
<ul>
<li>abc</li>
</ul>
Outputting:
- abc
It's occurred to me to do this with something like li:before { content: "-" };, though I don't know the cons of that option (and would be much obliged for feedback).
More generically, I wouldn't mind knowing how to use generic characters for list items.
Solution
You could use :before and content: bearing in mind that this is not supported in IE 7 or below. If you're OK with that then this is your best solution. See the Can I Use or QuirksMode CSS compatibility tables for full details.
A slightly nastier solution that should work in older browsers is to use an image for the bullet point and just make the image look like a dash. See the W3C list-style-image page for examples.
Answered By - Darko Z
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.