Reply
question about onmouseout effect using css
Old 10-21-2009, 12:54 AM question about onmouseout effect using css
Experienced Talker

Posts: 48
Trades: 0
question about onmouseout effect using css

my question is if i move the mouse over an image which is a link to get any effect i can use
a:hover{

}

lets say for example i have a horizontal row which contains images and these are links, ex= home aboutus ... total of 5 links
just above this horizontal row lets say i have the same set of 5 images which by default are hidden using display: none;
<img src="homehidden.jpg" id="home"> <img src="abouthidden.jpg" id="about"> ...

#home{
display: none;
}

#about{
display: none;
}
...


only when i mouse over any of the links which are visible by default, i would like to show 1 image relavant to the link ex=home which is above all the 5 visible images so should my css code be

visiblerowhomeimage:hover{
#home.visibility: visible;
}
which would show the invisible image on mouse over for home, aboutus etc...


please advice if my code is correct.

thanks.
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-21-2009, 01:04 AM Re: question about onmouseout effect using css
Skilled Talker

Posts: 95
Name: Brian
Trades: 0
I usually use Javascript to do this. If you want you can try my code:

in your head tags:
Code:
<script type="text/javascript">
function mouseOver()
{
document.b1.src ="(file name)";
}
function mouseOut()
{
document.b1.src ="(file name)";
}
</script>
body:
Code:
<a href="(link)"><img border="0" src="(file name)" name="b1" onmouseOver="mouseOver()" onmouseOut="mouseOut()" /></a>

Last edited by bdg1115; 10-21-2009 at 01:14 AM..
bdg1115 is offline
Reply With Quote
View Public Profile
 
Old 10-21-2009, 04:09 AM Re: question about onmouseout effect using css
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
This shows the various ways using colours;
http://www.modtalk.co.uk/_site/code/...on-mouse-over/

IF you are image swapping, the className change is the best to use, as it is quickest and there will be no delay in loading the image initially.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-21-2009, 04:09 AM Re: question about onmouseout effect using css
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
This shows the various ways using colours;
http://www.modtalk.co.uk/_site/code/...on-mouse-over/

IF you are image swapping, the className change is the best to use, as it is quickest and there will be no delay in loading the image initially.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to question about onmouseout effect using css
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.11359 seconds with 13 queries