473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bullet Colors

Is it possible in lists for the bullet to have a different color than
the text? If so how?
Jul 20 '05 #1
3 4097
Dante <pi******@reno. com> wrote:
Is it possible in lists for the bullet to have a different color than
the text? If so how?


HTML:
<ol>
<li><span>Tes t</span>
</ol>

CSS:
li
{
color: red;
}

li span
{
color: green;
}
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #2
pi******@reno.c om (Dante) skrev :
Is it possible in lists for the bullet to have a different color than
the text? If so how?


<style type="text/css">
ul {color: red}
..black {color: black}
</style>
</head>
<body>
<ul>
<li><span class="black">o ne</span></li>
<li><span class="black">t wo</span></li>
</ul>
--
Knud
Jul 20 '05 #3
pi******@reno.c om (Dante) wrote:
Is it possible in lists for the bullet to have a different color than
the text? If so how?


You could use the method with extra <span> in each <li>, as others have
suggested. But it's probably simpler to use images as bullets instead,
using list-style-image. This is more flexible since you can set the
shape too. The drawback is that the image is inevitably in fixed size
in pixels - making lists look a bit odd when the text size is
considerably larger or smaller than the size for which you have
designed the bullet image.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
16034
by: Gerald S. | last post by:
Hello, I am trying to set the space between the bullet and the first word in a UL, without any luck. My Lists look like: x Item 1 x Item 2 x Item 3
0
1921
by: Nikolaos Giannopoulos | last post by:
I am trying to get bullet images in paragraphs and lists to align properly - so far Moz 1.3 and Opera 6.05 handle both of these cases fine (NOTE: IE5 as expected does not render a bullet in the 1st case): http://solmar.ca/temp8/test4.html http://solmar.ca/temp8/test5.html which looks like this (taken with Moz 1.3): http://solmar.ca/temp8/img/moz13_bullet.gif
3
7585
by: Peter Schlenker | last post by:
In a navigation panel I try to place a bullet before each entry when the link is hovered at (see http://www.shambhala.de). Mozilla does it like expected, but IE doesn't - any ideas? <a href="http://www.shambhala.de/reisen/kailash.php" title=""><span class="bullet"><img src="http://www.shambhala.de/media/grafik/arrow_small.gif" width="9" height="9"/>&nbsp;</span>Tibet</a><br/>
1
12184
by: David Bradbury | last post by:
I may be thinking about this the wrong way, but here goes: In my style sheet I've specified that bullet points should use a specific image rather than just be default bullet points. However, at some later point in the text I don't want to use the bullet point with an image, but rather use the standard bullet point. Is it possible to switch off a style sheet instruction for an individual instance? Or do I need to define a new style...
8
53692
by: dp | last post by:
Is there anyway to have the bullet color of a <li> be a different color than the text without using an image? dp
7
6846
by: codeslayer | last post by:
Greetings to everyone in ‘forum-land': I have a problem that has plaguing me to no end. It is a CSS-related question, and I have not seen this question posted anywhere in forums or through Google search. So here is my problem: I want to use CSS to apply images as bullet styles. However, I want to be able to apply VARIOUS, MULTIPLE styles in the same document. For example, let's assume I have a set of categorized hyperlinks on a...
8
61498
by: Udo Marx | last post by:
Hello to ciwas! Is there a way to change the bullet form, color, etc, of the element <li> under<ul> via css? Any reply will be appreciated. -- Freundliche Gruesse, Netzteil - Udo Marx http://www.netzteil.com mailto:marx@netzteil.com
13
49890
by: Matt | last post by:
I would like to set the "list-style-type" to be a hyphen (-). How can I accomplish this in a style sheet. I tried list-style-type: hyphen; and list-style-type: dash; but neither worked. I also tried adding this to the style sheet (with the list-style-type set to none in the UL element). LI:Before { content: "- "; }
6
4710
by: Nathan Sokalski | last post by:
I am creating a BulletedList and would like to use a - as the bullet. However, I could not find a way to do this using the properties for the BulletedList control. Is there a way to use a specific character for the bullet without manually adding it to each ListItem? Thanks. -- Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/
0
9646
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
9483
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,...
1
10096
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
9956
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
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.