473,395 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Why doesn't !important work here?

Why doesn't the red color override the gray in this example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>

<body>
<font color="#FF0000" style="color: Red !important;"><FONT
color="#E0E0E0" size=4>SIGN UP FOR FREE TODAY - bad link
02/22/05</FONT></font>
</body>
</html>

Thanks,
Brett

Jul 21 '05 #1
8 2538
"brett" <ac*****@cygen.com> wrote:
Why doesn't the red color override the gray in this example:
Why should it? !important places the relevant rule higher up in the
cascade, it does not turn off inheritence.
<font color="#FF0000" style="color: Red !important;"><FONT
color="#E0E0E0" size=4>SIGN UP FOR FREE TODAY - bad link
02/22/05</FONT></font>


What horrible code.

strong {color: red; background: white; font-size: larger; font-weight:
normal;}

<strong>SIGN UP FOR FREE TODAY - bad link 02/22/05</strong>

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #2
Steve Pugh <st***@pugh.net> wrote:
"brett" <ac*****@cygen.com> wrote:
Why doesn't the red color override the gray in this example:


Why should it? !important places the relevant rule higher up in the
cascade, it does not turn off inheritence.


I don't mean turn off inheritence, do I? I mean it doesn't create some
sort of super-inheritence.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #3
in comp.infosystems.www.authoring.stylesheets, brett wrote:
Why doesn't the red color override the gray in this example:


URL? Browser?

Answer: you tested using broken browser. Important is not even needed. Do
not use transitional with CSS if you ant to get correct results using
broken browsers.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #4
*Steve Pugh* <st***@pugh.net>:

strong {color: red; background: white; font-size: larger; font-weight:
normal;}

<strong>SIGN UP FOR FREE TODAY - bad link 02/22/05</strong>


Or even:

strong {color: red; background: white;
font-weight: normal; font-size: larger;/*¹*/}
strong em {text-transform: uppercase;}

<strong><em>Sign up for free today</em> – bad link 22 Feb. 05</strong>

¹ It makes sense to order the properties this way in case you would ever
want to change to using the 'font' shorthand.

--
It's so simple to be wise. Just think of
something stupid to say and say the opposite.
Jul 21 '05 #5
Christoph Paeper <ch**************@nurfuerspam.de> wrote:
strong em {text-transform: uppercase;}


If replicating the original you's need font-style: normal in the em
rule as well.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #6
On 25 Feb 2005 08:22:26 -0800 brett wrote:
Why doesn't the red color override the gray in this example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head> <body>
<font color="#FF0000" style="color: Red !important;"><FONT
color="#E0E0E0" size=4>SIGN UP FOR FREE TODAY - bad link
02/22/05</FONT></font>
</body>
</html> Thanks,
Brett


<font-color:#FF0000;>
<font size="4">
<font-size:4;>

Jul 21 '05 #7
"Richard" <An*******@127.001> wrote:
<font-color:#FF0000;>
<font size="4">
<font-size:4;>


One out of those three is valid HTML. The other two are some sort of
bizarre melding of HTML and CSS syntax.

Now please explain how your three lines of rubbish pseudo-code is
supposed to help the OP? O

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #8
Richard wrote:
<snip>
<font-color:#FF0000;>
<font size="4">
<font-size:4;>


Richard

FONT is an old HTML 3.2 tag, depreciated in 4.0 and the syntax was

<FONT FACE="SomeFontName" COLOR="RED" SIZE="4>...</FONT>

But don't do this! Time to buy a NEW book ... and read it.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jul 21 '05 #9

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

Similar topics

3
by: Nicolas Fleury | last post by:
Hi, How can I know if a system command doesn't exist? All the ways I have tried behave like if the system command was existing but returning one. I don't want to sound provocative, but open in...
8
by: Grant Edwards | last post by:
Perhaps I'm doing something wrong: the struct module docs say it's IEE 754, but I can't figure out how to get it to handle NaN values correctly (either packing or unpacking). >>> x =...
46
by: Leo Breebaart | last post by:
I've tried Googling for this, but practically all discussions on str.join() focus on the yuck-ugly-shouldn't-it-be-a-list-method? issue, which is not my problem/question at all. What I can't...
7
by: Domenic G. | last post by:
I was wondering how many Oracle DBAs out there have bosses that are complete doe-doe birds? My current boss is a beaut -- has absolutely no concept of Oracle, keeps flipping back and forth from...
44
by: Mariusz Jedrzejewski | last post by:
Hi, I'll be very grateful if somebody can explain me why my Opera 7.23 (runing under linux) doesn't show me inner tables. Using below code I can see only "inner table 1". There is no problem with...
10
by: Peter Pfannenschmid | last post by:
Hi folks, it's me again... since I have learned many things with the help of you, I have put together an example which is compliant to XHTML 1.0 strict and to CSS 2, but isn't shown at all in...
39
by: Mark Johnson | last post by:
It doesn't seem possible. But would the following also seem a violation of the general notions behind css? You have a DIV, say asociated with class, 'topdiv'. Inside of that you have an anchor...
18
by: Gustaf Liljegren | last post by:
IE does, and I can't remember this used to be a problem in Netscape. I guess someone in the Mozilla team just came up with a Smart Idea about the True Semantics of the Hyphen Minus character. :-(...
149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
3
by: Simon van Beek | last post by:
Dear reader, What can be wrong in my ComboBox, the property "Auto Expand" is set to Yes, but by typing in the ComboBox it doesn't expand. Is this because the source of the ComboBox is a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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,...

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.