Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



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

Posts: 254
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
 
 
Register now for full access!
Old 10-21-2009, 01:04 AM Re: question about onmouseout effect using css
Extreme Talker

Posts: 201
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
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
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
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
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.13055 seconds with 12 queries