BleepingComputer.com: How to make a custom HTML symbol-style bullet in CSS lists?

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to make a custom HTML symbol-style bullet in CSS lists?

#1 User is offline   Bumdark 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 10
  • Joined: 14-July 09
  • Location:Québec

  Posted 10 September 2009 - 01:57 PM

Hi. I have a really simple question regarding how to do something with CSS lists, and I think this is the right place to ask. (If not, let me know. =))

I'm trying to modify the default bullet styles for unordered lists (<ul>). But instead of anything predefined ("circle", "square", etc.) or an image, I'm trying to use the HTML symbol "»" (written "&_#187;", without the underscore, in HTML code). Problem is, I've tried all sorts of things and nothing seems to work. I've done some searching but I haven't found how to use HTML symbols for bullets.

Anyone know how to do this? I just want something like this:

* * * * * *
Begin unordered list
» Item 1
» Item 2
» Item 2-A
» Item 2-B
» Item 3
End unordered list

* * * * * *
And so forth. All I need to learn to do is how to use "»" as bullets.

Thanks in advance. =)

This post has been edited by Bumdark: 10 September 2009 - 01:58 PM

'Foreman's not as easy as Cameron. But of course, who is?'
'I'm in the room!'

#2 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 10 September 2009 - 02:16 PM

http://www.alistapart.com/articles/taminglists/
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#3 User is offline   Bumdark 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 10
  • Joined: 14-July 09
  • Location:Québec

Posted 10 September 2009 - 02:32 PM

@Groovicus:
Actually, that was the very first article on the matter that I found and read. It explains how you can add whatever symbol you want manually for each list element, within the <li></li> tags. What I'm wondering is if it's possible to automatically make all the tags into said desired symbol, instead of inputting them one at a time. Ie., is it possible to set a global rule, and have all the standard list bullets on a webpage turn into the symbol?
'Foreman's not as easy as Cameron. But of course, who is?'
'I'm in the room!'

#4 User is offline   groovicus 

  • Hail Groovicus!
  • PipPipPipPipPipPip
  • Find Topics
  • Group: Moderator
  • Posts: 9,605
  • Joined: 05-June 04
  • Gender:Male
  • Location:Centerville, SD

Posted 11 September 2009 - 03:17 PM

Yes. The article explains exactly how to create a CSS class....
"Take the risk of thinking for yourself, much more happiness, truth, beauty, and wisdom will come to you that way" - Christopher Hitchens

#5 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

Posted 27 September 2009 - 04:43 PM

You need to do this, it replaces tbe default bullet with your chosen image i would go with a 16 x 16 px image :thumbsup:

li {
list-style-image:url("/images/blueball.gif");
}


Hope this helps, Wolfy87.

#6 User is offline   Bumdark 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 10
  • Joined: 14-July 09
  • Location:Québec

Posted 01 October 2009 - 04:10 PM

Whoops! Missed your reply, Wolfy87. That’s exactly what I ended up doing, and now it works perfectly. Thanks anyway. =)
'Foreman's not as easy as Cameron. But of course, who is?'
'I'm in the room!'

#7 User is offline   Wolfy87 

  • Senior Member
  • PipPipPipPip
  • Find Topics
  • Group: Members
  • Posts: 414
  • Joined: 25-July 08
  • Gender:Male
  • Location:England

  Posted 02 October 2009 - 11:12 AM

No problem =]

#8 User is offline   aliciajames 

  • New Member
  • Pip
  • Find Topics
  • Group: Members
  • Posts: 2
  • Joined: 03-December 07

Posted 17 February 2010 - 01:03 AM

View Postgroovicus, on Sep 10 2009, 02:16 PM, said:



Thank you so much for sharing this valuable piece of information, i was looking for it and it resolve my many issues which i was facing these days.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users