/    Sign up×
Community /Pin to ProfileBookmark

Firefox says color attribute is wrong

Hi

I have this in a style sheet.

a { font-family: Tahoma; font-size: 8pt; color: #OOOOFF; font-weight: bold; text-decoration: underline; }

Firefox’s Javascript console tells me …

“Expected color but found ‘#0000FF’. Error in parsing color property. Declaration dropped.’

It doesn’t say this for other elements where color is defined using the ‘#0000FF’ method.

Any idea what I have done wrong? Thanks for any help.

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelNov 09.2006 — Hi

I have this in a style sheet.

a { font-family: Tahoma; font-size: 8pt; color: #OOOOFF; font-weight: bold; text-decoration: underline; }

Firefox's Javascript console tells me ...

"Expected color but found '#0000FF'. Error in parsing color property. Declaration dropped.'

It doesn't say this for other elements where color is defined using the '#0000FF' method.

Any idea what I have done wrong? Thanks for any help.[/QUOTE]


I don't think that Firefox's [I]javascript console[/I] would be telling you this about a [I]CSS property[/I], -at teast, -not the one you cited above.

Do you have javascript in your page anywhere? It might be useful to see your entire code to understand this, or link to URL if available...
Copy linkTweet thisAlerts:
@A1ien51Nov 09.2006 — You are using the letter O OH and not a ZERO!

0-9 A-F

Eric
Copy linkTweet thisAlerts:
@A1ien51Nov 09.2006 — I don't think that Firefox's [I]javascript console[/I] would be telling you this about a [I]CSS property[/I], -at teast, -not the one you cited above.

Do you have javascript in your page anywhere? It might be useful to see your entire code to understand this, or link to URL if available...[/QUOTE]



The console does point out CSS errors.

Eric
Copy linkTweet thisAlerts:
@WebskaterauthorNov 09.2006 — You are using the letter O OH and not a ZERO!

0-9 A-F

Eric[/QUOTE]


Hi, thanks for your reply. I am definitely using zero not noughts. Just to be sure I retyped the colour as #0000FF (not #OOOOFF) and Firefox still says the same thing.

If I change it to ....

color: blue

it works

change it back to

color: #0000FF

and Firefox says it is wrong.
Copy linkTweet thisAlerts:
@WebJoelNov 09.2006 — is it possible that the javascript is choking on the "#"? Try removing it and see it that works. Or maybe putting a "" in front of the "#" to 'hide' the next character (but there I am guessing).

-I'm a little surprised that the javascript console is catching a line in what is apparently CSS. Is that line you cite embedded in a javascript? It looked to me like a standard CSS declaration.

-It would be like an HTML editor catching an error in a javascript (which to my knowledge, it would not)... hmm. I should use javascript console sometime...
Copy linkTweet thisAlerts:
@felgallNov 10.2006 — Well without the # it would be invalid. Try lowercase

color:#0000ff;
Copy linkTweet thisAlerts:
@WebJoelNov 10.2006 — Well without the # it would be invalid. Try lowercase

color:#0000ff;[/QUOTE]

I keep thinking that there's a javascript in there, and that [I]that[/I] is where the error comes from... I have seen *js that use color=nnnnnn (without the "#"). I can't imagine why OP is running j[I]avascript console[/I] on a page that if I understand correctly, doesn't use javascript, but yes, in CSS the missing "#" would throw an error.


I wish we could view the code. Now I'm getting very interested in this. ?
Copy linkTweet thisAlerts:
@Jeff_MottNov 10.2006 — Webskater, can we see the entire page? There is likely some other unrelated syntax error earlier in the page that this making this line choke.
×

Success!

Help @Webskater spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...