PDA

View Full Version : Onmouseover


JDesigns
08-28-2008, 06:25 PM
Ok. I'm using dreamweaver cs3 and in the behaviors section I made a photo enlargeable when clicked on and is opened in a new browser window (simple). But when i go over the picture with my cursor there is no change. I would like it to change to a hand or something so that people know they can click on them. Of course I do want the cursor to change back to normal when not over the pictures. Thanks for any help.

Corrosive
08-28-2008, 06:28 PM
Try adding this to your CSS

cursor: hand;

Not entirely 'browser friendly' I'm afraid.

JDesigns
08-28-2008, 06:34 PM
Could you be a little more specific. thanks

Corrosive
08-28-2008, 06:40 PM
Could you be a little more specific. thanks

Errrrm, I'll try.

Select the CSS definition for the layer/div that contains your image. Choose to edit it and go to 'Extensions' in the menu. You'll see 'Visual Effect'. Select Cursor and hand and it should write the code I just posted into your CSS definition.

Then, when you view it in a browser it should show a hand when you hover over it.

Understand?

JDesigns
08-28-2008, 07:07 PM
I do understand, but there is no hand option.

Also, I don't have a div for just the pic so it changes the cursor in the entire main div.

I'm trying to use the behaviors panel and use script for the OnMouseOver to make it happen for specific images. I'd assume that I might need something for OnMouseOut too, or maybe not?

Corrosive
08-28-2008, 07:09 PM
I do understand, but there is no hand option.

Also, I don't have a div for just the pic so it changes the cursor in the entire main div.

I'm trying to use the behaviors panel and use script for the OnMouseOver to make it happen for specific images. I'd assume that I might need something for OnMouseOut too, or maybe not?

I don't suppose this is on line anywhere J?

Corrosive
08-28-2008, 07:13 PM
I do understand, but there is no hand option.

Also, I don't have a div for just the pic so it changes the cursor in the entire main div.

I'm trying to use the behaviors panel and use script for the OnMouseOver to make it happen for specific images. I'd assume that I might need something for OnMouseOut too, or maybe not?

Actually cursor: hand; may not be all that well supported so it may not be in CS3. Apologies for that, Try cursor: pointer; instead. I think that is WC3 supported.

Corrosive
08-28-2008, 07:24 PM
OK, had one more thought. try adding this CSS code in between your style tags in your page. It should apply to every image in the page then.


img {
cursor: hand;
}


or


img {
cursor: pointer;
}

domedia
08-28-2008, 08:29 PM
Use both, like this. It needs to work cross browser:
cursor: hand;
cursor: pointer;

JDesigns
08-28-2008, 09:35 PM
Thanks that worked.

Also, if you want you can go to the behaviors panel and find OnMouseOver and type

this.style.cursor="pointer"

and it will work just for that picture

Corrosive
08-29-2008, 06:47 AM
Thanks that worked.

Also, if you want you can go to the behaviors panel and find OnMouseOver and type

this.style.cursor="pointer"

and it will work just for that picture

Hey nice one. Good thread, I think we all learned something. :)