CSS to change font

J

JCO

How would you modify this to include font color to be white:
<style type="text/css">ul,ol{color:white;}</style>

I tried this, but it did not work:
<style type="text/css">font color="#FFFFFF",ul,ol{color:white;}</style>
 
M

Michael Winter

How would you modify this to include font color to be white:
<style type="text/css">ul,ol{color:white;}</style>

CSS is off-topic in this group. Please refer style sheet questions to
comp.infosystems.www.authoring.stylesheets in the future.
I tried this, but it did not work:
<style type="text/css">font color="#FFFFFF",ul,ol{color:white;}</style>

That's because it's an invalid selector. Read the specification regarding
selectors:
http://www.w3.org/TR/REC-CSS2/selector.html

If you're using CSS, why are you bothering with deprecated elements like
FONT, anyway?

Your solution would either be to use a styled SPAN element to surround
highlighted text (which I assume is your goal):

span.white, ul, ol {
/*
Make sure that an explicit background-color property
is specified here or in an ancestor.
*/
color: #ffffff;
}
...
<p>Some <span class="white">white</span> text</p>

....or to match the color attribute value in the font element:

font, ul, ol {
color: #ffffff;
}

The latter won't work in IE, due to its abysmal CSS 2 support, though it
will render the font element. The first solution is obviously preferred.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top