Mouseover/imageswap/show <div> (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


kopythat -> Mouseover/imageswap/show <div> (11/16/2005 9:54:17)

I have been playing with this for a bit and just cant figure it out.....i think maybe because I am using to different types of code...


but this is what I want to do:

I have an image, and on mouseover i want to swap the image. and on click I want to show a description of the picture in text box. and on mouse out restore the image. and when another image is clicked to swap that image and show a different descripton n the text box(div slot)

I can get 1 or the other to work, but not both at the same time.....

If someone could help that would be greatlly appreciated

Kopy




rdouglass -> RE: Mouseover/imageswap/show <div> (11/16/2005 19:15:51)

quote:

have an image, and on mouseover i want to swap the image. and on click I want to show a description of the picture in text box. and on mouse out restore the image. and when another image is clicked to swap that image and show a different descripton n the text box(div slot)


Can you post what you have? I don't think CSS will do all of that 'cause of the "on click" requirement you have. I don't know of any "onclick"s in CSS. I suspect a JavaScript will be required.




chistolinks -> RE: Mouseover/imageswap/show <div> (12/16/2005 8:10:03)

what you're trying to do cannot be done with css as far as i know. you'll need javascript to do this. look at http://javascript.internet.com. there are good examples there. you might want to combine two or more javascripts to be able to do everything that you're asking for.

christopher links




Lazykatz -> RE: Mouseover/imageswap/show <div> (1/1/2006 23:29:34)

As rdouglass said.. post your work online so everyone knows what you're trying to do, also make sure the page(s) validate.

html- http://validator.w3.org/check/referer
css- http://jigsaw.w3.org/css-validator/check/referer

Here is the site of Stu Nicholls.. he does wonders with working with images, menus, mouseovers using CSS. You can see some of the mouseover effects on this page before it redirects you to his new site in 15 seconds.
http://www.stunicholls.myby.co.uk/

You can find alot of help in the CSS links section posted in this forum.
http://www.frontpagewebmaster.com/m-173804/tm.htm

Grizz




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625