468,272 Members | 2,101 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

List items have background color but the actual bullets do not!

37
Hi

I am trying to create a bulletted list that has a colored background.
The follow css code successfully applies the background color to the list
items, but for some reason does not apply the background color to the bullets.

The disk.gif image is a 10px by 10px bullet graphic.
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css">
  2. #menu ul{
  3.     font-family: Arial, Helvetica, sans-serif;
  4.     font-size: 16px;
  5.     font-weight: bold;
  6.     background-color: FFD520;
  7.     width: 150px;
  8.     margin-top: 0px;
  9.     margin-right: 0px;
  10.     margin-bottom: 0px;
  11.     margin-left: 20px;
  12.     padding-top: 20;
  13.     padding-right: 20;
  14.     padding-bottom: 20;
  15.     padding-left: 0;
  16.  
  17. #menu li{
  18.     list-style-image: url(images/disk.gif);
  19.     display:list-item;
  20.     } 
  21. </style> 
  22.  
  23. <div id="menu"> 
  24. <ul> 
  25.  
  26. <li>Item 1</li> 
  27. <li>Item 2</li> 
  28. <li>Item 3</li> 
  29. <li>Item 4</li> 
  30. <li>Item 5</li> 
  31. </ul> 
  32. </div> 
Can someone please help with this.
Jun 1 '08 #1
2 2143
vedika
9
Add following to you stylesheet.
Expand|Select|Wrap|Line Numbers
  1. #menu{
  2. background-color: FFD520;
  3. }
Jun 7 '08 #2
Max58kl
37
Thanks for that!
Bullets now look fine.
Jun 9 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by David Ross | last post: by
25 posts views Thread by Haines Brown | last post: by
6 posts views Thread by Stephen Miller | last post: by
3 posts views Thread by yawnmoth | last post: by
20 posts views Thread by shapper | last post: by
6 posts views Thread by Harlan Messinger | last post: by
5 posts views Thread by Roy Smith | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.