View Full Version : Small if statement or CSS?

07-15-2007, 06:19 PM
if condition is active
#navigationdiv .select li:hover .sub { display: block; }
#navigationdiv .current .sub {display: none; }
#navigationdiv .current .sub {display: block; }

Here is what I want:
When .select li is hovered, .current .sub is not displayed. I do not think this is possible with CSS so I was wondering if it was possible with javascript. If it is possible with CSS please tell me. I am doing this so I do not have to use a background color to cover up the other sub links

http://twodayslate.com/test/nav.php Here is the link for the nav I am trying to fix
Also what would I have to do so when you hover over a .select the sub links stay visible for 3 seconds and then go back to the .current sub links. I believe this would be easier for the user (so if they accidentally go over forums they don't go right back from the start)

Would it be something like this?
if ( document.getElementById('navigationdiv').select.li:hover.sub.style.display = 'block' )
{ document.write.getElementById('navigationdiv').current.sub.style.display ='none' }
{ document.write.getElementById('navigationdiv').current.sub.style.display ='block' }

What if javascript is disabled? How do I set it up so I make a css file just for disabled javascript users? Please point me to a link or something. Thank you!

07-18-2007, 06:59 PM
is this possible in js or css?

07-24-2007, 04:53 AM
Perhaps this is not an if statement?

07-28-2007, 09:14 PM

07-31-2007, 03:02 PM
Have a look at ijiwebdesign.com/content/view/82/77/ (http://fijiwebdesign.com/content/view/82/77/)

This offers a pure CSS solution that may be what you want.
John Rostron

07-31-2007, 04:58 PM
I know how to hide and then make something show up on hover but what I do not know is how to hide something and then on hover make it show up and hide the original item.

08-14-2007, 11:32 PM
Any help?