473,231 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

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 2302
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

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

Similar topics

3
by: David Ross | last post by:
I sometimes place a sidebar on a Web page, using the following: ..sideright { float: right; background-color: #fff; width: 40%; font-size: 90%; text-align: justify; margin-left: 1em;...
25
by: Haines Brown | last post by:
I have a table with three columns, and I want the data in the first column to align left, while that in the remaining columns to align right: #testTable { text-align: right; } #leftcol {...
6
by: Stephen Miller | last post by:
Hi, How can I configure an ordered list so that the bullet is placed on the right hand side of the list item. ie: list item 1 * list item 2 * list item 3 * Thanks,
2
by: Wiz | last post by:
Greetings the group! I see from a few previous postings that I am not the only person having a problem with hidden list item bullets. This question applies to both IE 6, current version, and...
3
by: yawnmoth | last post by:
I'm trying to center list elements in a webpage I'm working on, and setting margin-left to auto for ol (or ul) seems to prevent the number (or bullet) from displaying in IE6 (strict mode) and...
20
by: shapper | last post by:
Hello, I have the following: <ol id ="ol"> <li id="li1">item1</li> <li id="li2">item2</li> <ol> Is it possible to display the List Items on the horizontal, i.e., side
6
by: Harlan Messinger | last post by:
Please take a look at http://www.gavelcade.com/list_next_to_float.html How can I style a list so that if it appears next to a left-floated box as the first list does in this example, the list...
5
by: Roy Smith | last post by:
Be kind to me, I'm a CSS newbie... I've been playing with drupal, building a web site (hyc-test.org). I started with the "sky" theme, but didn't like the way it rendered list items in menus. ...
9
by: MP12 | last post by:
I've got a <div class="content"which is within a <div id="main"> I'm finding that the ul and li values for the main div are being inherited into the content div, in particular, the main div has a...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.