473,405 Members | 2,415 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,405 software developers and data experts.

Validation problem

The http://jigsaw.w3.org/ validator does not seem to like "transparent"
as a background color and gives this error:

Line : 5 (Level : 1) You have no background-color with your color : #logo_1

on this CSS:

#logo_1 {
font-family: Arial, Helvetica, Geneva, Sans-Serif;
font-size: 150%;
font-weight: normal;
color: #660000;
background-color: transparent;
}

..cite1 {
font-family: Arial, Helvetica, Geneva, Sans-Serif;
color: #660000;
background-color: #338833;
}

All of my style sheets validated the last time I checked them but all of
a sudden they are failing with this error.

Any info gratefully accepted.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
Is there another word for synonym?
Oct 12 '05 #1
7 1559
Ed Mullen wrote:
The http://jigsaw.w3.org/ validator does not seem to like "transparent"
as a background color and gives this error:

[snip]

Ok, here's a further test.

Using the info from these w3 sites:

http://www.w3schools.com/css/css_background.asp
http://www.w3schools.com/css/tryit.a...ckground-color

The code from the second link is:

body {background-color: yellow}
h1 {background-color: #00ff00}
h2 {background-color: transparent}
p {background-color: rgb(250,0,255)}

I put this online at: http://ed.mullen.home.comcast.net/temp/junk.css

Then I checked the code at http://jigsaw.w3.org/css-validator/ using
each of the three ways offered: an online URL, a file upload, and
pasting the text into the box. The last two produce a response that
would lead a user to believe the css code does not validate. However,
the first method pronounces "Congratulations" and that "This document
validates as CSS!" But it also gives the warnings about having no
background-color specified.

Very confusing.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
In any conflict the boundaries of behavior are defined by the party
which cares least about morality. - Randy Wayne White
Oct 12 '05 #2
On Wed, 12 Oct 2005, Ed Mullen wrote:
The http://jigsaw.w3.org/ validator does not seem to like
"transparent" as a background color and gives this error:
It's not an error. It's a warning.
Line : 5 (Level : 1) You have no background-color with your color : #logo_1
Quite right. Review previous discussion on this issue.
All of my style sheets validated the last time I checked them but all of a
sudden they are failing with this error.


It's *not* an error. Look again at the report: If there are any
errors, they will be *listed* as errors.

| Congratulations!
|
| Valid CSS! This document validates as CSS!

Wasn't that clear?

Then there is a sub-header for the warnings:

| Warnings
| URI : http://ed.mullen.home.comcast.net/styles/default.css

if there are any (and in this case there were quite a few).

It's a piece of advice, and it relates to the cascade (that's the "C"
in "CSS"). But see the previous discussion for detail.
Oct 12 '05 #3
Alan J. Flavell wrote:
On Wed, 12 Oct 2005, Ed Mullen wrote:

The http://jigsaw.w3.org/ validator does not seem to like
"transparent" as a background color and gives this error:

It's not an error. It's a warning.


I finally realized that. See my first response to myself in this thread.
Line : 5 (Level : 1) You have no background-color with your color : #logo_1

Quite right. Review previous discussion on this issue.

All of my style sheets validated the last time I checked them but all of a
sudden they are failing with this error.

It's *not* an error. Look again at the report: If there are any
errors, they will be *listed* as errors.

| Congratulations!
|
| Valid CSS! This document validates as CSS!

Wasn't that clear?


Sure, once I finally saw it after validating the code as an online file.
As I said in my other post there are three methods of validation and
that message only is given by one of them.

Then there is a sub-header for the warnings:

| Warnings
| URI : http://ed.mullen.home.comcast.net/styles/default.css

if there are any (and in this case there were quite a few).
Why are you talking about that style sheet? I never mentioned it in
either of my posts.

It's a piece of advice, and it relates to the cascade (that's the "C"
in "CSS"). But see the previous discussion for detail.


I read the previous discussion and I understand the concept of cascades.
I appreciate your comments but none of them address my original point
which is that the validator doesn't recognize /transparent/ as a value.
That's the primary source of the warnings.
--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
An ounce of practice is worth more than tons of preaching. - Mohandas Gandhi
Oct 12 '05 #4
Once upon a time *Ed Mullen* wrote:
Alan J. Flavell wrote:

I read the previous discussion and I understand the concept of cascades.
I appreciate your comments but none of them address my original point
which is that the validator doesn't recognize /transparent/ as a value.
That's the primary source of the warnings.


The validator gives the warnings because if you don't have a
background color the written content may not be visible to a user with
a custom stylesheet with a prefered background color for the body.
That may give the same color for background and for text content. And
a transparent color is the same as no color in that sentence, since
the "main" background is visible.

But after all, it's not an error to omit the background color. And
even the word "Warning" sounds a bit hard, better to call it an
"Advice" since that's what it is really (in my humble opinion) :)

So, if the "main" background color (or image) is essential to keep
"clean" and not interupted with other colors, then use the transparent
with the knowledge that some users may not see that part of the content.

--
/Arne
Now killing all posts originating at GoogleGroups
Workaround: http://www.safalra.com/special/googlegroupsreply/
-------------------------------------------------------------
Oct 12 '05 #5
On Wed, 12 Oct 2005, Ed Mullen wrote:
Then there is a sub-header for the warnings:

| Warnings
| URI : http://ed.mullen.home.comcast.net/styles/default.css

if there are any (and in this case there were quite a few).
Why are you talking about that style sheet?


I tried validating the obvious web page URL that you had cited in your
posting.
I never mentioned it in either of my posts.
Presumably it's referenced from the URL that you cited, though.
I read the previous discussion and I understand the concept of
cascades. I appreciate your comments but none of them address my
original point which is that the validator doesn't recognize
/transparent/ as a value.


It does rather look that way - well, at least it doesn't treat
"transparent" as specifying an explicit colour, and it reports
accordingly.

However, the resulting advice is still good - even if one believes it
was offered for the wrong reason. Specifying an explicit text colour,
together with "transparent" as the background colour, could just as
likely fall foul of a hostile cascade, as specifying an explicit text
colour and omitting any background colour. Think it through, and
you'd have to come to the same conclusion, I reckon.

There may be some motive why you want to accept this risk, but the
warning is still an appropriate one, IMHO.
Oct 12 '05 #6
On Wed, 12 Oct 2005, Alan J. Flavell wrote:
I tried validating the obvious web page URL that you had cited in your
posting.
I never mentioned it in either of my posts.


Presumably it's referenced from the URL that you cited, though.


To be clear - I seem to have confused yout test URL with the one in
your sig, and validated the latter instead. But it doesn't change the
conclusion.

regards
Oct 12 '05 #7
Arne wrote:
Once upon a time *Ed Mullen* wrote:
Alan J. Flavell wrote:

I read the previous discussion and I understand the concept of cascades.
I appreciate your comments but none of them address my original point
which is that the validator doesn't recognize /transparent/ as a value.
That's the primary source of the warnings.

The validator gives the warnings because if you don't have a
background color the written content may not be visible to a user with
a custom stylesheet with a prefered background color for the body.
That may give the same color for background and for text content. And
a transparent color is the same as no color in that sentence, since
the "main" background is visible.

But after all, it's not an error to omit the background color. And
even the word "Warning" sounds a bit hard, better to call it an
"Advice" since that's what it is really (in my humble opinion) :)

So, if the "main" background color (or image) is essential to keep
"clean" and not interupted with other colors, then use the transparent
with the knowledge that some users may not see that part of the content.


Thanks, Arne. All of the pages on my site use a background image so it
seems that transparent would be the best choice for those definitions
where I had not specified a background color.

I still find it quite strange that transparent is a legal value for that
property and the validator tells me I have not specified one. Sigh.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
Music is essentially useless, as life is. - George Santayana
Oct 12 '05 #8

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

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
41
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What...
3
by: Kent Ogletree | last post by:
I am porting a Java XML Validation class over to C# and I am having a problem finding exactly what I need to acomplish the task. First I need to test for well formedness. I know this is usually...
4
by: | last post by:
Hello Guys, I am using the validation controls to validate my data. But the problem is "The page is still being posted to server". I want to get rid of the round trips to server. Are there...
4
by: usl2222 | last post by:
Hi folks, I appreciate any assistance in the following problem: I have a form with a bunch of dynamic controls on it. All the controls are dynamically generated on a server, including all...
3
by: john morales | last post by:
Hi guys, I have a problem and i know there must be a solution for this as it is such a basic common practice in asp.net development. Scenario: i have many webforms in a site, most with two...
5
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and...
4
by: David Colliver | last post by:
Hi all, I am having a slight problem that hopefully, someone can help me fix. I have a form on a page. Many items on the form have validation controls attached. Also on this form are...
9
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
2
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.