Page 1 of 1

HTML help..

Posted: Tue Jan 20, 2009 3:46 pm
by bennylenny88
i need a code to have a picture change when you scrollover it.. pleaseee

Re: HTML help..

Posted: Tue Jan 20, 2009 3:52 pm
by Kev
That's called a rollover effect

http://www.htmlcodetutorial.com/images/ ... pp_62.html

Neater to use css though.

Re: HTML help..

Posted: Tue Jan 20, 2009 4:52 pm
by rehmondo
Kev is right, css is much neater and much easier to manage.

Here's the first usable example I found for you on the net...

http://www.sohtanaka.com/web-design/css ... -captions/

Example working: http://www.sohtanaka.com/web-design/exa ... age-hover/

I've done things in the past using 1 image, but its made up of 3 smaller images, then using css it will show the bit you want to see using positioning, this means, when the page is rendered the image is loaded just once rather than 3 times for every link etc

I can go into further details but that link about should get you started, if you have trouble getting it, just reply back and I'll help you out - either by writing the code you need or helping you understand how it works.

I'm a senior developer in a software firm, our technologies rely on html/java/javascript heavily and we use css to manage a lot of cross browser issues rather than quick javascript fixes.

I take it it will be something not related to the forum?

Re: HTML help..

Posted: Tue Jan 20, 2009 6:00 pm
by Kev
rehmondo wrote: I've done things in the past using 1 image, but its made up of 3 smaller images, then using css it will show the bit you want to see using positioning, this means, when the page is rendered the image is loaded just once rather than 3 times for every link etc
This forum uses the same principle

The new post button for instance is this
Image
and the rollover effect is achieved just by offsetting the image position.