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
Old 12-29-2009, 04:17 AM on hover
Ultra Talker

Posts: 254
Trades: 0
please see this example i have created
http://sudhakargolakaram.co.in/hover.html

when i hover over a link i want to display an image i have used the following code

initially i had

<div id="div1">
<a href="#">mouse over to see a hidden image<br />
<div class="div2">
<img src="greeting2.jpg" />
<p>Lorem ipsum dolor sit amet, consetetur sadi pscing sed diam</p>
<p>Erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Lorem ipsum dolor sit amet, consetetur sadi pscing elitr, sed diam</p>
</div>
<!-- div2 ends -->
</div>
<!-- div1 ends -->

#div1{
float: left;
width: 900px;
height: auto;
}

.div2{
visibility: hidden;
}

#div1 a:hover .div2{
visibility: visible;
}

however this is not working, since div2 is contained within div1 i thought i could manupilate the content of div2


my point is if i can get this to work instead of showing just 1 element for example an image i can show more than 1 element which is inside a div
for this feature to work should i be using javascript and get the id of div2 and for onmouseover for the link in div1 should i make the entire div2 visible or is this possible using only css and not with jquery


also another question if i had div2 lets say in the right column and div in the left column of the layout, obviously in this case both div1 and div2 would be independent to each other, and in this case if i hover over the mouse in div1 and i wanted to display the entire content of div2 which consists of more than 1 element, in this case i guess i will have to use onmouse javascript and write a function to display div2 using getElementById() am i correct


please advice

thanks
sudhakararaog is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-29-2009, 10:24 AM Re: on hover
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
#div1 a:hover .div2{

this would apply to an element with a class of "div2" inside an anchor element in a hover state inside an element with the ID of div1
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-01-2010, 02:16 PM Re: on hover
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You might want to look at this method instead:
http://meyerweb.com/eric/css/edge/popups/demo2.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-01-2010, 07:01 PM Re: on hover
Ultra Talker

Posts: 254
Trades: 0
thanks for the link

the technique of on hover displaying text and images i guess does not work in
ie6 but works in all other browsers
sudhakararaog is offline
Reply With Quote
View Public Profile
 
Old 01-02-2010, 12:57 PM Re: on hover
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
the technique of on hover displaying text and images i guess does not work in ie6 but works in all other browsers
For it to work in IE6 you will need to use something like the whatever:hover method - just Google it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to on hover
 

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.33488 seconds with 12 queries