473,805 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

37 New Member
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 2318
vedika
9 New Member
Add following to you stylesheet.
Expand|Select|Wrap|Line Numbers
  1. #menu{
  2. background-color: FFD520;
  3. }
Jun 7 '08 #2
Max58kl
37 New Member
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
5489
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; padding: 2% } ..sideleft { float: left; background-color: #fff;
25
3050
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 { text-align: left; } <table id="testTable"> <col id="leftCol" /> <col span="2" />
6
35593
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
2775
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 Firefox 0.8 browsers, which I am using for testing. I have a design in progress that uses a relatively positioned, left-floated, 122px wide navbar, with the main content padded to the right by 10px, wrapping under after it exceeds the height of the...
3
6122
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 Opera7 (it works fine in Firefox). Any ideas as to why and what I might do to fix it? I've set up a little demonstration of the problem here: http://www.frostjedi.com/terra/dev/test.html It's set up to render in quirks mode to demonstrate that it...
20
2932
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
2938
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 items, with their bullets, still appear indented relative to the text above and below the list (i.e., without having the bullets overlapping the float), without messing up the appearance if the list *doesn't* happen to land next to the float, as...
5
9856
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. Spcifically, it started with: list-style-image: url(../../misc/menu-expanded.png);
9
5481
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 'list-style-type: square' and I cannot get rid of it from the content div, even though is set to 'list-style-type: none' Is there a way to force a div class within a div id to not inherit these values, or some other method to get around this? ...
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10607
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.