473,803 Members | 3,766 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS to change font

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

I tried this, but it did not work:
<style type="text/css">font color="#FFFFFF" ,ul,ol{color:wh ite;}</style>
Jul 20 '05 #1
2 1530
On Tue, 02 Mar 2004 14:02:10 GMT, JCO <J.********@ver izon.net> wrote:
How would you modify this to include font color to be white:
<style type="text/css">ul,ol{colo r:white;}</style>
CSS is off-topic in this group. Please refer style sheet questions to
comp.infosystem s.www.authoring.stylesheets in the future.
I tried this, but it did not work:
<style type="text/css">font color="#FFFFFF" ,ul,ol{color:wh ite;}</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">w hite</span> text</p>

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

font[color="#ffffff"], 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

--
Michael Winter
M.******@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #2
JCO wrote:
How would you modify this to include font color to be white:
<style type="text/css">ul,ol{colo r:white;}</style>

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


No wonder it is not working, since it is invalid CSS at best:

<http://jigsaw.w3.org/css-validator/>

You are looking for either

body, ul, ol {
color:white;
}

or

* {
color:white;
}

(to format all elements) and comp.infosystem s.www.authoring.stylesheets
where all this is on-topic.

Be sure to specify a proper background-color, too:
<http://www.w3.org/QA/Tips/color>
X-Post & F'up2 ciwas

PointedEars
Jul 23 '05 #3

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

Similar topics

8
9454
by: S.W. Rasmussen | last post by:
A trivial (?) question: does anyone know how to change the shape of the cursor in a RichTextBox control from the normal vertical line to an underscore?
3
13281
by: BKM | last post by:
Is there a way that I can change the default font in VB6 so I don't have to constantly change the font of each new control that I add to my project?
16
14532
by: Coder Droid | last post by:
I'm trying my first table-less site, and I've bumped my head up against a wall. I can't change the font size within a div. Real quick, my style sheet has: ------------------------------------- body { font: 8pt "face" } #nav {float: left; width: 144px; } #test { font: 12pt; font-weight: bold } -------------------------------------
9
3782
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with body like <br><br> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1> Abc <font size=+1>
3
379
by: (Pete Cresswell) | last post by:
I'd like to have SQL come up in a mono-spaced font like Courier New. Anybody been able to do this? -- PeteCresswell
2
8759
by: Hariharan S | last post by:
Hi Guys, Have an issue with the Font object. I have a text box in which I can enter text and I have included a small button which upon selection, should enable me to change the newly entered text into bold. But it is not what is happening. All the previous information entered in the regular font too gets changed to bold. The code on the button click event handler is as follows ...
2
16215
by: Jim | last post by:
Working with VB.net under VS.Net 2003. Have a simple form with a Button1. I want to change the font on the button when the button is clicked. Is there a way to Dynamically change the Font for Button1 from regular to bold, change the size etc. This line of code: Button1.Font.Bold = True
3
5636
by: Phil Stanton | last post by:
Correct me if I'm wrong, but is it impossible to change the font in a report field when in print preview (MDE database) or can it only be done in design view in the MDB database. Part of my database is used to print name tags for functions, and it would be nice for the operator to have a choice of different fonts, colours and backgrounds. I have a copy of Terry Kreft and Stephen Lebans font selector mdb Thanks
5
3070
by: _Who | last post by:
I spent all day yesterday trying different things. Something has happened so I can't change font size. I have a table and in the first cell I have only text. I tried using the cell's Style to change the font size. I tried using the cell's attribute to change the font size. I tried adding a paragraph element and doing the above to it. Removed all font sizes from Body, Table...
18
7781
by: wizdom | last post by:
Help - change text on click - text has another onclick inside with php variables ---------- I think what I'm trying to do is simple. I have a 2 buttons on a page. 1 button allows a thread of messages to be displayed, the other button collapses that same thread. Works fine. I was asked if I can just make it one button. I've played around with a few java scripts. they seem to all work fine until i put my added codes in the text line...
0
9569
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
10318
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...
0
10069
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...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
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
5503
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
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
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
3
2975
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.