Compile time error: "[value] is not a valid value for the 'color' (or 'background-color') property

Greetings:

 Have tried searching for anything to do with this error message and I either get far too many results to search or nothing at all. So here's the problem.

In a CSS style sheet I have built various styles selecting colours from the IDE's color picker/web colors tab. Two of the colors for example are 'named' "cornflower blue" and "crimson". If I preview a page in the browser with styles containing these 'values' (which are written into the style sheet as their names not Hex or RGB values), everything is fine. But if I run the app in debug...the compiler with throw these errors:

Error 2 'crimson' is not a valid value for the 'color' property. 

Error 3 'lightgrey' is not a valid value for the 'color' property. 

Error 4 'cornflowerblue' is not a valid value for the 'background-color' property.

There are 9 total, but some of them are repeats, but I think this exemplifies the problem well enough.

 I find nowhere to discover the hex values for these 'named colors' so that I might substitute those values for the names, but it seems rather odd that a development tool that is going to allow you to 'choose' what appears to be a system constant, doesn't actually recognize them. Can anyone explain what's happening here and how I might go about finding out the hex values for these colors so that I can specify those in the style sheet instead of these names?

0
eyetech
1/19/2007 7:06:11 PM
asp.net.web-dev-2005-express 3977 articles. 0 followers. Follow

1 Replies
566 Views

Similar Articles

[PageSpeed] 22

Those color names, although supported by most browsers, are NOT standard. CSS2.x only allows 16 color names. CSS3 (draft) has names for all 256 colors, but again, CSS3 is not an official standard yet. Therefore, VS 2005 CSS validation flags color names as non-standard attributes. Remember, even if browser renders page correctly, it does not mean page will pass W3C validation. Browsers are very forgiving since they must be able to handle all kinds of HTML including pages written long before Web standards were established.

You can switch HTML validation schema to IE6 and this will allow all color names. However, both CSS and HTML validation will be agains IE6, not against XHTML. 


Thanks

------------------------------------------------------------

This posting is provided "AS IS" with no warranties, and confers no rights.
0
Mikhail
1/20/2007 4:13:34 AM
Reply:

Similar Artilces:

superreview canceled: [Bug 294987] In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| : [Attachment 312620] (Av1)
Serge Gautherie <sgautherie.bz@free.fr> has canceled Serge Gautherie <sgautherie.bz@free.fr>'s request for superreview: Bug 294987: In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| https://bugzilla.mozilla.org/show_bug.cgi?id=294987 Attachment 312620: (Av1) <EdColorPicker.js> https://bugzilla.mozilla.org/attachment.cgi?id=312620&action=edit ------- Additional Comments from Serge Gautherie <sgautherie.bz@free.fr> [Mozilla/5.0 (Windows; U; W...

superreview requested: [Bug 294987] In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| : [Attachment 313207] (Av1
Serge Gautherie <sgautherie.bz@free.fr> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 294987: In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| https://bugzilla.mozilla.org/show_bug.cgi?id=294987 Attachment 313207: (Av1a) <EdColorPicker.js> https://bugzilla.mozilla.org/attachment.cgi?id=313207&action=edit ------- Additional Comments from Serge Gautherie <sgautherie.bz@free.fr> [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-U...

superreview granted: [Bug 294987] In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| : [Attachment 313207] (Av1a)
neil@parkwaycc.co.uk <neil@httl.net> has granted Serge Gautherie <sgautherie.bz@free.fr>'s request for superreview: Bug 294987: In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| https://bugzilla.mozilla.org/show_bug.cgi?id=294987 Attachment 313207: (Av1a) <EdColorPicker.js> https://bugzilla.mozilla.org/attachment.cgi?id=313207&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <neil@httl.net> >+ // Disable button - no l...

superreview requested: [Bug 294987] In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| : [Attachment 312620] (Av1
Serge Gautherie <sgautherie.bz@free.fr> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 294987: In <EdColorPicker.xul>, "Warning: Error in parsing value for property 'background-color'. Declaration dropped.", with empty |Last*Color| https://bugzilla.mozilla.org/show_bug.cgi?id=294987 Attachment 312620: (Av1) <EdColorPicker.js> https://bugzilla.mozilla.org/attachment.cgi?id=312620&action=edit ------- Additional Comments from Serge Gautherie <sgautherie.bz@free.fr> [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US...

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

'Value' should be between 'minimum' and 'maximum'.
I'm attempting to invoke with parameters:  Dim thing2 As New mydelsubPBStep(AddressOf pbStep) Me.Invoke(thing2, "setMax", dt.Rows.Count)      <---- this is where the error occurs   the delegate looks like this: Private Delegate Sub mydelsubPBStep(ByVal mode As String, ByVal value As Integer)   the function it's calling looks like this:Private Sub pbStep(ByVal mode As String, ByVal value As Integer) Select Case mode.ToLower Case "clear" ProgressBar1.Value = 0 Case "step" ProgressBar1.PerformStep() L...

value of variable switches from ' ' to 'value'
--------------000108090907030800060105 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I'm trying to figure out what exactly a script I wrote (see the attachment) is doing by stepping through it in the debugger. I have an array of dates in %Y-%m-%d format for each of the last 7 days. So, for instance, the range of dates for today (June 17, 2007) is from the 10th to the 16th. I then take these dates and use them to find work tickets in our ticketing system which were last updated on the day currently being checked. So, the first date would be 200...

is not a valid value for the 'background-color'
I get this message in my Css for GhostWhite (and other colours) but there is no error if I type directly into html style='background-color:GhostWhite'I only seem to get an error if there are other errors on the page otherwise it is not a problem as far as I knowCan anybody help me, is it valid to use this type of colour in CSS?jnc Hi everyone, I get these error-messages for f.e. "DarkGreen" and "LightYellow" which are supposed to be web-safe.These errors don't affect the running of the application but it's a bit enoying at designtime to have your error-lis...

how to specify 'near to' value and 'from-to' value
Hi, I have a property search  with a ability to enter minimum and maximum price and also a sq. m. area size. How do I implement this in my sql query  - 'from-to' value and 'near to' value ThanksAndy Current project: Cycle round the world  Hi,you could use the BETWEEN statement. SELECT PropertyName, Price WHERE Price BETWEEN 100 AND 500  for your "NEAR TO" search you also could use the BETWEEN statement. SELECT PropertyName, Price WHERE Price BETWEEN @SearchValue - 100 AND @SearchValue + 100 Hope this helps :-) ...

Cast from type ''''DBNull'''' to type ''''String'''' is not valid.
How do I avoid getting this error: Cast from type ''''DBNull'''' to type ''''String'''' is not valid. I am trying to get values from the database into a form for updating using a Datareader, SQL is set to allow nulls for certain fields as they are not required but the only way I can get the form to display is by adding a space in SQL. Is there another way around this? Check if it is equal to DBNull.Value first and if it is, don't do the cast.Stanley Tan theSpoke Blog Where in the code does it need to go? I am using the following and it's the profile that isn't always requi...

Compiler Error Message: BC30311: Value of type 'System.Web.UI.DataSourceSelectArguments' cannot be converted to 'Integer'.
 Hello, I'm wondering if someone can help me figure out why I'm receiving the above error message..."Compiler Error Message: BC30311: Value of type 'System.Web.UI.DataSourceSelectArguments' cannot be converted to 'Integer'." In visual web developer, the blue line is pointing out the variables args, on line 15.   1 Imports System.Data 2 Partial Class POS_so_Default 3 Inherits System.Web.UI.Page 4 5 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 6 customer...

Compiler Error Message: BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'IWizardStep'.
I am working with a Book ASPNET 2.0 Unleashed "by the way, great book". There code is witten with <script> tags and the vb is in the same page as the Html. So, as practice, I am simply trying to convert it to code behind... The page calls a class named "IWizardSetp" See both there code and my convered code below. I get the following error. What am I doing wrong? Details please if you can help... Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details a...

expression(offsetParent.scrollTop)' is not a valid value for the 'top' property
 I see a lot of sample code that says I can use this css expression in IE5+ browsers:top:expression(offsetParent.scrollTop) Yet, Visual Studio 2005 flags this as an error with ' is not a valid value for the 'top' property. John A. Bailo Yeah, I'm noticing this too! Hi, In the CSS Editor of Visual Studio 2005, the expression(offsetParent.scrollTop) will be treated as a invalid value, and will show this invalid values in the Error List. You can configure the Visual Studio 2005 not to show this error by Tools -> Options -> Text Editor -> CSS -&...

Web resources about - Compile time error: "[value] is not a valid value for the 'color' (or 'background-color') property - asp.net.web-dev-2005-express

Resources last updated: 12/7/2015 11:22:59 AM