473,386 Members | 1,969 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,386 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 2304
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.