Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts

    Small if statement or CSS?

    Code:
    if condition is active
    #navigationdiv .select li:hover .sub { display: block; }
    trigger
    #navigationdiv .current .sub {display: none; }
    else
    #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)


    edit://
    Would it be something like this?
    Code:
    if ( document.getElementById('navigationdiv').select.li:hover.sub.style.display = 'block' )
     { document.write.getElementById('navigationdiv').current.sub.style.display ='none' }
    else
     { 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!
    Last edited by twodayslate; 07-15-2007 at 07:09 PM.
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #2
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    is this possible in js or css?
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #3
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    Perhaps this is not an if statement?
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #4
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    Possible?
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #5
    Regular Coder Actinia's Avatar
    Join Date
    Feb 2007
    Location
    Essex, UK
    Posts
    250
    Thanks
    1
    Thanked 23 Times in 22 Posts
    Have a look at ijiwebdesign.com/content/view/82/77/

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

  • #6
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    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.
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #7
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    Any help?
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •