You are here: Re: Any simple javascript to show an image when mouse over? « HTML « IT news, forums, messages
Re: Any simple javascript to show an image when mouse over?

Posted by Adrienne Boswell on 05/22/07 03:42

Gazing into my crystal ball I observed kelvin <kelvin_gl@yahoo.com.cn>
writing in news:1179785274.364539.95410@x35g2000prf.googlegroups.com:

First, don't top post...
Second, don't my put response to the top and make ME at top poster!
Posting fixed...
> On May 21, 10:27 am, Adrienne Boswell <arb...@yahoo.com> wrote:
>> Gazing into my crystal ball I observed kelvin <kelvin...@yahoo.com.cn>
>> writing innews:1179731642.144085.194360@u36g2000prd.googlegroups.com:
>>
>> > Hi,
>>
>> > I would like to have a very simple code to show an image when the
>> > mouse is hovered over a link.
>> > some codes in HTML like

<snip javascript>

>> > I make a search and found a lot of complicated javascripts.
>> > Can anyone give me a simple sample?
>>
>> > Thank you a lot,
>>
>> Why bother with javascript in the first place? CSS is the way to go.
>> Oh, and please don't use target="_blank", it's very annoying and
breaks
>> the back button.
> Thank you a lot for this comments. I will remove them.

That's great! Another convert! Yippee!

>>
>
> It is a great new I have heard. Can anyone tell me how to do it (show
> an image when mouse is over a link) by css or any simple way for I am
> a newbie at HTML/CSS design?
>

I suggest you read some HTML and CSS tutorials, but here's something
quick and dirty:

<style type="text/css">
/* sets common properties for a elements */
a {background-repeat: none; background-position: left; padding-left:
16px;}
/* sets the different states for the a element */
a:link {background-image: url(linkimg.png); }
a:visited {background-image: url(visitedimg.png);}
a:hover {background-image: url(hoverimg.png); }
a:active {background-image: url(activeimg.png); }
</style>
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация