Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8521351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:47:59+00:00 2026-06-11T06:47:59+00:00

I have two navigational elements that are set up as columns on either side

  • 0

I have two navigational elements that are set up as columns on either side of an image. You can see them in place at my website, here. Click on any image and after it loads, hover over it.

What I’m trying to accomplish is as follows:

  1. When the cursor is outside of the image, both nav buttons are set at 0% opacity.
  2. When the image is hovered in the center (not over either of the two nav buttons), both nav buttons are set at 50% opacity.
  3. When either nav button is hovered directly, it is set at 100% opacity and the other nav button is set at 0% opacity.

This isn’t working at the moment. HTML is as follows:

<div id="sb-body">
    <a id="sb-nav-previous" class="sb-bignav" title="Previous" onclick="Shadowbox.previous()"></a>
    <a id="sb-nav-next" class="sb-bignav" title="Next" onclick="Shadowbox.next()"></a>
    <div id="sb-body-inner">
        <img style="position: absolute;" src="Corrosion.jpg" id="sb-player" height="405" width="609">
    </div>
</div>

And CSS is as follows:

    #sb-nav-next {
    right:0;
    background:url('../images/nav-right.png') center center no-repeat;
}

#sb-nav-previous {
    left:0;
    background:url('../images/nav-left.png') center center no-repeat;
}

#sb-body:hover .sb-bignav {
    opacity:0.5;
    -webkit-opacity:0.5;
    -moz-opacity:0.5;
}

#sb-nav-next:hover #sb-nav-previous, 
#sb-nav-previous:hover #sb-nav-next {
    opacity:0;
    -webkit-opacity:0;
    -moz-opacity:0;
}

.sb-bignav {
    cursor:pointer;
    position:absolute;
    width:200px;
    height:100%;
    top:0;
    z-index:400;
    opacity:0;
    -webkit-opacity:0;
    -moz-opacity:0;
    transition: opacity .125s ease-in;
    -webkit-transition: opacity .125s ease-in;
    -moz-transition: opacity .125s ease-in;
}

.sb-bignav:hover {
    opacity:1.0;
    -webkit-opacity:1.0;
    -moz-opacity:1.0;
}​

Demo: http://jsfiddle.net/zNkcQ/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:48:00+00:00Added an answer on June 11, 2026 at 6:48 am

    This can be done using pure CSS, but, you need to move the previous and next elements past the inner body element.

    Demo: http://jsfiddle.net/SO_AMK/c5Xn3/

    CSS:

    #sb-body-inner { 
        height: 405px; 
    } 
    /* This is the height of the image inside the slider.
    If you do not change this line than #sb-body-inner will be about 20px tall and 
    will not trigger the hover event */
    
    #sb-body-inner:hover ~ #sb-nav-previous.sb-bignav,
    #sb-body-inner:hover ~ #sb-nav-next.sb-bignav { 
        opacity: 0.5; 
    }
    
    #sb-nav-previous.sb-bignav:hover,
    #sb-nav-next.sb-bignav:hover {
        opacity: 1.0;
        -webkit-opacity: 1.0;
        -moz-opacity: 1.0;
    }
    
    .sb-bignav {
        cursor: pointer;
        position: absolute;
        width: 200px;
        height: 100%;
        top: 0;
        z-index: 400;
        opacity: 0;
        -webkit-opacity: 0;
        -moz-opacity: 0;
        transition: opacity .125s ease-in;
        -webkit-transition: opacity .125s ease-in;
        -moz-transition: opacity .125s ease-in;
    }
    
    #sb-nav-next {
        right: 0;
        background: url('http://www.element17.com/images/nav-right.png') center center no-repeat;
    }
    
    #sb-nav-previous {
        left: 0;
        background: url('http://www.element17.com/images/nav-left.png') center center no-repeat;
    }​
    

    HTML:

    <div id="sb-body">
        <div id="sb-body-inner">
            <img style="position: absolute;" src="http://www.element17.com/gallery/01_CONSTRUCTS/Shear.jpg" id="sb-player" height="405" width="609">
        </div>
        <a id="sb-nav-previous" class="sb-bignav" title="Previous" onclick="Shadowbox.previous()"></a>
        <a id="sb-nav-next" class="sb-bignav" title="Next" onclick="Shadowbox.next()"></a>
    </div>
    

    ​

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two <div> elements that I want to position side by side like
I have two columns say Main and Sub . (they can be of same
I have two pages that inherit from one master page, First.aspx or second.aspx. Navigation
I have a navigation bar that has two dropdowns (as nested ul's). I'm trying
Imagine you have two adjacent columns. The first (left most) is the primary navigation
I am using sprites to control two graphical navigation elements. The CSS I have
I have two Entity classes: Order and OrderItem . Order contains a navigation property
Have two folders with approx. 150 java property files. In a shell script, how
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two tables images2 and image_data So the goal is to have 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.