Forum Moderators: open

Message Too Old, No Replies

Css/dhtml

Can this be done?

         

Civichunter

6:55 am on Sep 1, 2005 (gmt 0)

10+ Year Member



Hi guys,

Picture the following scenario:

You have the following two pictures or text (maybe wrapped in a DIV.. who knows)

PICTURE APICTURE B
SAMPLE TEXT

There is an area on the web page where the "sample text" is above
When the user moves the mouse over picture A, it will display "Your mouse pointer is currently over picture A" and conversely, when it is over picture B, it will display "Your mouse pointer is currently over picture B"

I am aware that this can easily be done using Javascript onmouseover event.... but would really prefer not to use it.
So is there a way the above can be achieved using a cobination of CSS and DHTML?

Cheers

tedster

7:06 am on Sep 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



DHTML is an informal name for a combination of css and javascript. It's not really a separate technology, just a kind of nickname. So I think you're asking if there is a pure css approach, and the answer, unfortunately, is no.

In dhtml, css handles display (style, visiblity, etc) and javascript is needed to "listen" for events, such as clicks, and where the mouse is hovering at any moment. To execute your idea, you would need the javascript part of dhtml, to listen for mouse events.