|
-
Dec 12th, 2001, 12:32 PM
#1
Thread Starter
Frenzied Member
Bad CSS or Bad Opera?
What is wrong with this page?
Code:
<html>
<head>
<style type="text/css">
body {
background-color: 6666CC;
}
p {
color: FF0000;
}
</style>
</head>
<body>
<p>This is an ugly page.</p>
</body>
</html>
I see what I expect to see in IE 5.0 and Netscape 6.1. I see red text on a white background in Opera 5.12, but black text on a white background in Opera 6.0.
***? Is Opera that messed up? I have it in document or author mode, and I have selected to use the author's CSS, but... what?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Dec 12th, 2001, 01:03 PM
#2
Black Cat
According to the CSS specs, for "accessibility" reasons, you have to set color and background color at the same time per tag.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Dec 12th, 2001, 02:41 PM
#3
Thread Starter
Frenzied Member
I didn't see that, but it makes sense.
Code:
<html>
<head>
<style type="text/css">
body {
color: 000000;
background-color: 6666CC;
}
p {
color: FF0000;
background-color: transparent;
}
</style>
</head>
<body>
<p>This is an ugly page.</p>
</body>
</html>
Regretably, that makes no difference. Did I do it wrong?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Dec 12th, 2001, 02:59 PM
#4
Black Cat
Do the specs allow you to leave off the # in front of the color hex? I know you can use an alternate rgb() color format.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Dec 12th, 2001, 03:10 PM
#5
Thread Starter
Frenzied Member
That was is it. It is now working in Opera 5.12 and 6. Now that I know the reason, I'm a (very) little upset that Netscape 6 didn't break, too.
Thanks.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|