FacebookTwitter
Hatrack River Forum   
my profile login | search | faq | forum home

  next oldest topic   next newest topic
» Hatrack River Forum » Active Forums » Books, Films, Food and Culture » css question

   
Author Topic: css question
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
is there any way to change the display attribute of one element(whether through the display or visibility property) when another element is rolled over(using the hover class)?

Or is this any other method using only css that can accomplish this?

Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
Lisa
Member
Member # 8384

 - posted      Profile for Lisa   Email Lisa         Edit/Delete Post 
I don't think so. I think you have to script it.
Posts: 12266 | Registered: Jul 2005  |  IP: Logged | Report this post to a Moderator
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
yeah, that's what i'm thinking. I'm trying to do an experiment and complete a whole site completely with css, no scripts at all. It's harder than I thought.
Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
okay, i figured out a way to do it. let me know if there's an easier or better way.

I had 3 images displayed inline as list items, and when each were rolled over i needed a text box to appear somewhere else on the page. So what I did was take the images out of list form and put each in it's own div. I then put the three of them in one large div spanning the whole area i would need to work with(the images are across the bottom of the screen and the text needed to display further up on the page). i have all the text in paragraphs with "display:none" inside each of the divs with their respective image. when i hover over each image i just change the display to block and expand the size of each div(so the effect occurs only when i hover over the image itself). actually was pretty simple.

Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
Strider
Member
Member # 1807

 - posted      Profile for Strider   Email Strider         Edit/Delete Post 
well, it took some more finagling to get that code to function correctly with the other hover elements i had going on the page. Because the new div overlapped other divs i had to scroll completely off the new large div to be able to access those other elements. changing some sizes around and playing with position of elements within the div fixed it.

and yes, i realize that i have to make a workaround for older versions of IE. are there statistical breakdowns of the percentages of people using different IE versions? I wish everyone would just switch over to firefox and make my life easy.

[ June 29, 2007, 01:52 AM: Message edited by: Strider ]

Posts: 8741 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
striplingrz
Member
Member # 9770

 - posted      Profile for striplingrz   Email striplingrz         Edit/Delete Post 
don't we all

I hate it when someone says "but it looks right in Internet Explorer..."

[Wall Bash]

Posts: 176 | Registered: Sep 2006  |  IP: Logged | Report this post to a Moderator
fugu13
Member
Member # 2859

 - posted      Profile for fugu13   Email fugu13         Edit/Delete Post 
Nobody knows the real percentages, but they're pretty small. In 2004, these were the numbers, and the IE 5 numbers will have dropped fairly significantly since then: http://www.onestat.com/html/aboutus_pressbox34.html

The main thing is, know your audience. For the general public, the page should be fine so long as it degrades semi-gracefull in IE 5.5 . Any IE 5 user will be used to not all webpages looking exactly right, so so long as you make it so your site is still usable, and they can get at the information they want, and the main content is given enough space and decent formatting, they'll be fine.

Some businesses are still on standardized old browsers -- even Netscape 4.x in some places. Run away [Wink] . But its unlikely those businesses are your audience (and they're really used to things looking weird).

Posts: 15770 | Registered: Dec 2001  |  IP: Logged | Report this post to a Moderator
   

   Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Hatrack River Home Page

Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2