CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 3rd, 2008, 11:30 PM
echoskybound echoskybound is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 5 echoskybound User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 20 sec
Reputation Power: 0
Unhappy PLEASE help: Need to make div appear when hovering over image

If anyone can help me with this, I will owe my life, because I'm in over my head with a project for my electronic media class and I'm not good enough with CSS.


I need to make divs appear when I hover over images. The images aren't links, just anchors. I have a long page with a ton of images, and I need divs (with tables inside) to appear when I hover over those images. Also, if possible.. I'd like the appearing divs to move relative to the browser, but if not, I'll settle for absolute.



It must be so simple, but I'm waaay too stressed to get this to work. :[

Reply With Quote
  #2  
Old May 4th, 2008, 06:47 AM
essee essee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 82 essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 7 h 27 m 10 sec
Reputation Power: 12
Making changes to one element when you hover over another is not possible in CSS.

You need a client side scripting language like javascript.

It is possible using to get similar results using CSS sprites or (as I recently discovered when helping another poster here) spans.

Check out this thread and see if that might be what your after.
http://forums.devshed.com/css-help-...its-526833.html

Re-reading through your post I think javascript might be your only/best option.

Reply With Quote
  #3  
Old May 4th, 2008, 12:47 PM
echoskybound echoskybound is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 5 echoskybound User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 20 sec
Reputation Power: 0
Quote:
Originally Posted by essee
Making changes to one element when you hover over another is not possible in CSS.

You need a client side scripting language like javascript.

It is possible using to get similar results using CSS sprites or (as I recently discovered when helping another poster here) spans.

Check out this thread and see if that might be what your after.

Re-reading through your post I think javascript might be your only/best option.


Yeah.. I realized shortly after posting that I'm gunna have to end up using java, but that's okay with me. whatever will make this work, lol.

There was some helpful code on that thread, but it was discussing how to make an image appear - I need to have a hidden div that appears when an image is hovered over. Is it a similar code?

Reply With Quote
  #4  
Old May 7th, 2008, 09:33 AM
montana_won montana_won is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 15 montana_won User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 12 m 34 sec
Reputation Power: 0
hey man thats my thread ur using essee..
i never approved learning rights!! lol jk!

im lurking in here still..
and hey i got that hover image load-delay sorted..
i simply made the link and hover images sit side by side in the one image.. ad did this..
Code:
a.class1:hover 
	{
   background-position: -74px 0;
	}

i googled it obviously


hey echos.. im noob so don't hold me at gunpoint if im not right..
but maybe what this guy has done is what you are referring to..
Code:
http://forums.devshed.com/css-help-116/help-with-css-rollover-528430.html

Reply With Quote
  #5  
Old May 9th, 2008, 01:25 AM
Arem Arem is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 22 Arem User rank is Corporal (100 - 500 Reputation Level)Arem User rank is Corporal (100 - 500 Reputation Level)Arem User rank is Corporal (100 - 500 Reputation Level)Arem User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 15 sec
Reputation Power: 0
You can easily get elements (a paragraph, or a div, for example) to appear when you hover over an image using css.

For example, place an image inside a relatively positioned div, then follow it with a paragraph. Set the paragraph to position: absolute (and position it just to the side of the image somewhere--eg, left: 96px; top: 15px). Also, set its display to none.

Then add this bit of css-- div: hover p, p:hover {display: block;}

That way, the paragraph will only display when you hover over the image (and it keeps displaying if you hover over the paragraph, too).

Only one problem: it don't work in IE6 (of course). For that, you need a JavaScript file such as csshover.htc.

Hope this is useful. I must add that I got this from Wyke-Smith's excellent css book "Stylin' for the Web" (pp128-132). I highly recommend this book for anyone wanting to get up to speed with css. Worth every cent.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > PLEASE help: Need to make div appear when hovering over image


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway