By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

Hover over an image and insert text

P: n/a
I currently have a page that has 6 images in a row. Using javascript,
when the mouse goes over one of the images, a word is placed below the
images. Each image has a different word. I am trying to change this
to happen through CSS. I think I might be able to use a hover
technique similar to the one used here:

http://css.maxdesign.com.au/listamat...rizontal04.htm

Focusing specifically on this line:

ul#navlist li:hover ul#subnavlist li a:before { content: " >> "; }

I was thinking of something like:

img#image1:hover p#textarea a:before { content: "some text"; }

Where the image1 is what the mouse needs to be over and the textarea
contains a link that the text needs to be placed before. But for the
life of me I have been unable to get it to work. I think it may have
to do with the heirarchy of elements, but I'm just not sure. Am I on
the right track, or is there a better way to do this?
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Pamel wrote:
img#image1:hover p#textarea a:before { content: "some text"; }

Where the image1 is what the mouse needs to be over and the textarea
contains a link that the text needs to be placed before. But for the
life of me I have been unable to get it to work.
IE/Win does not support css generated content. Does that explain
what's wrong?
I think it may have
to do with the heirarchy of elements, but I'm just not sure.


Neither am I, without more information. What browser is this failing
in? What is the url?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2

P: n/a
"Brian" wrote...
Pamel wrote:
img#image1:hover p#textarea a:before { content: "some text"; }

Where the image1 is what the mouse needs to be over and the textarea
contains a link that the text needs to be placed before. But for the
life of me I have been unable to get it to work.


IE/Win does not support css generated content. Does that explain
what's wrong?


It doesn't work in either IE or Firebird 0.9. Honestly I didn't expect it to
work in IE, and I really don't care if it does.
I think it may have
to do with the heirarchy of elements, but I'm just not sure.


Neither am I, without more information. What browser is this failing
in? What is the url?


http://commo.de/CSSb0rken/hover/addtext.html

It isn't just the before/content stuff, I can't get any hover effect to affect
anything other than stuff immediately around it.
Pamel


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.