This is topic css question in forum Books, Films, Food and Culture at Hatrack River Forum.


To visit this topic, use this URL:
http://www.hatrack.com/ubb/main/ultimatebb.php?ubb=get_topic;f=2;t=049110

Posted by Strider (Member # 1807) on :
 
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?
 
Posted by Lisa (Member # 8384) on :
 
I don't think so. I think you have to script it.
 
Posted by Strider (Member # 1807) on :
 
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.
 
Posted by Strider (Member # 1807) on :
 
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.
 
Posted by Strider (Member # 1807) on :
 
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 ]
 
Posted by striplingrz (Member # 9770) on :
 
don't we all

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

[Wall Bash]
 
Posted by fugu13 (Member # 2859) on :
 
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).
 


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