954,152 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Special Character Bullets

Whats the best way to use a special character as a bullet for lists in CSS.

I'm trying to use "»"?

vexhawk
Newbie Poster
24 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 
li{
    content: "\00BB \0020";
}


Won't work in IE though. If you want it to be cross-browser use an image instead.

stymiee
He's No Good To Me Dead
Moderator
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
 

thanks. i tried doing that to an inline "li" didn't seem to work.

vexhawk
Newbie Poster
24 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

Hmm, how would it work in inline tags?

I have this:

<li style="content: '\00BB \0020';">


it doesn't seem to work.

vexhawk
Newbie Poster
24 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

an earlier post mentions that for IE to use an image...what would the syntax be for that?

tracyselena
Newbie Poster
1 post since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

Two methods I can think of.
You have the image property for Lists, and you have the background-image proprerty also.

li
{
list-style-image: url(yourimage.ext);
}


Or

li
{
list-style: none;
background-image : url(yourimage.ext);
}


Note, with the background-image method, you may need to apply a bit of padding to the list.

autocrat
Posting Pro in Training
431 posts since Feb 2005
Reputation Points: 63
Solved Threads: 12
 

Hmm, how would it work in inline tags?

I have this:

<li style="content: '\00BB \0020';">

it doesn't seem to work.

Hi vexhawk, try this:

ul li:before { content: "\00BB \0020"; }


It works for me

KingRosales
Newbie Poster
1 post since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

The pseudo selector can't support in IE 6 and older. Using the background image must be more flexible and comfortable. I never used the pseudo selector for styling the elements.

Zero13
Practically a Master Poster
624 posts since Jan 2009
Reputation Points: 120
Solved Threads: 138
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You