Click to See Complete Forum and Search --> : embeded CSS :: hover


bokeh
10-15-2007, 04:08 PM
<a style="color:red">Is it possible to include a hover color when the css is embeded?

WebJoel
10-15-2007, 04:42 PM
The pseudoclass is a selector subset of (usually) an anchor, followed by 'rules' such as the hover color, underline, etc, active color, underline, etc , etc. rules.
Inline styles are just rules as the 'selector' is the HTML tag itself ("p", "div", "a", etc). Being that they are not the same, I don't think that they can be combined that way. :confused:

If this worked, it might be written like:

<a href="#" style="color:red; :hover:green;">link</a>, but this won't work...(I think it won't work, -now I have to try this!) :confused:

stacywacy
10-15-2007, 05:08 PM
I've tried forever to get hover in the inline, but it doesn't work, or at least all the numerous ways I've tried, including what you're suggesting, Joel.

It's probably much easier to just add it in the <style> tags in the header of the page. At least that's what I do when I only want it on one page, else add it to the style sheet.

bokeh
10-15-2007, 05:10 PM
I found this (http://www.w3.org/TR/css-style-attr#examples) but can't get it to work.

WebJoel
10-15-2007, 05:46 PM
You're right. -I can't get that to work either. :confused: :confused:

scragar
10-15-2007, 05:54 PM
as it says in the paragraph above that, it's a work in progress for the standards(my guess is that it's either there for them to decide how it looks before they define the standard for it, or so they can inform us in advance of how the newer standards will work - much better than IEs "look @ what I do now, didn't get warned of that huh" nature).