Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding colour to <ul> <li> bullet points 1

Status
Not open for further replies.

j111111

Technical User
Dec 13, 2002
46
GB
does anyone know how to add colour to the bullet points created with the <UL> <LI> tags?

I've tried adding color=&quot;#3399CC&quot; into the tags themselves but had no luck - they're still black

 
no I just tried <UL color=&quot;#3399CC&quot;>, same with the <li> tag

should it be <ul style=&quot;color:#3399CC;&quot;> ?
 
That worked, cheers!

My pages can stay all blue now ;-D!
 
Yep, needs to be in style=&quot;&quot;

Better yet would be to put it into the head of your document:
<head>
<style type=&quot;text/css&quot;>
<!--
.bluelist {color:#3399CC; background: inherit;}
-->
</style>
</head>

<body>
<ul class=&quot;bluelist&quot;>
<li></li>
...


É
::
 
it was only for a few lists out of about 50 pages - in this case it's only really worth putting it into the tag itself.
I try to keep my CSS stuff for styles I'll be using a lot throughout the site so my code doesn't get too cluttered/hard to understand (I'm only just starting getting into the code side of things)
 
I do the same thing if it's only for a few items. Still it's a better practice to keep everything in external style sheets. Maybe one day you might perfer red lists! :)

Thx for the *
Remember to use comments, it's help organise your code, make it easier to read later.


É
::
 
thanks for the tip on comments - i've just been trying to keep stuff to the bare minimum for now but i can see how they'll help when you go back to look at something a few weeks down the line.
 
especially if you use tables for layout or lots of layers, sometimes it's impossible to keep track of what starts and ends where. I always insert comments as i'm adding tables, etc

É
::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top