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

  • SEARCH
  • Home
  • 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 4234832
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:24:44+00:00 2026-05-21T02:24:44+00:00

This gallery works fine except that when you mouseoff the list of thumbnails, it

  • 0

This gallery works fine except that when you mouseoff the list of thumbnails, it reverts to the default image. Any ideas?

Here’s the CSS:

#gallery {width:750px; height:450px; position:relative;}
#gallery .default {position:absolute; left:7px; top:5px; border:10px solid rgba(255,255,255,0.5); z-index:-1; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;}
#gallery ul {list-style:none; padding-top:25px; margin-top:10px; width:180px; float:right;}
#gallery ul li {display:inline; width:60px; height:60px; float:left;}

#gallery ul li a {display:block; width:50px; height:50px; text-decoration:none; padding:5px; background-color: #83d4ff;}
#gallery ul li a img {width:50px; height:50px; border:0;}

#gallery ul li a b {position:absolute; left:-9999px; display:block; width:570px; height:420px; background:#83d4ff;}

#gallery ul li a:hover,
#gallery ul li a:active,
#gallery ul li a:focus {white-space:normal; border-color:#83d4ff; background-color: rgba(255,255,255,0.5); outline:0;z-index:100;}

#gallery ul li a:hover b {position:absolute; left:0; top:5px; z-index:99;}
#gallery ul li a:active b,
#gallery ul li a:focus b {position:absolute; left:0; top:5px;}


#gallery ul li a b i {display:block; width:570px; height:400px; text-align:center; display:table-cell; vertical-align:middle;}
#gallery ul li a b i img {width:auto; height:auto; border:10px solid rgba(255,255,255,0.5);-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;}

And the HTML:

    <div id="gallery">
        <img class="default" src="images/p1.jpg" alt="" />
            <ul>
                <li><a href="#x"><img src="images/p1.jpg" alt="" /><b><span></span><i><img src="images/p1.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p2.jpg" alt="" /><b><span></span><i><img src="images/p2.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p3.jpg" alt="" /><b><span></span><i><img src="images/p3.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p4.jpg" alt="" /><b><span></span><i><img src="images/p4.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p5.jpg" alt="" /><b><span></span><i><img src="images/p5.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p6.jpg" alt="" /><b><span></span><i><img src="images/p6.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p7.jpg" alt="" /><b><span></span><i><img src="images/p7.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p8.jpg" alt="" /><b><span></span><i><img src="images/p8.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p9.jpg" alt="" /><b><span></span><i><img src="images/p9.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p10.jpg" alt="" /><b><span></span><i><img src="images/p10.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p11.jpg" alt="" /><b><span></span><i><img src="images/p11.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p12.jpg" alt="" /><b><span></span><i><img src="images/p12.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p13.jpg" alt="" /><b><span></span><i><img src="images/p13.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p14.jpg" alt="" /><b><span></span><i><img src="images/p14.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p15.jpg" alt="" /><b><span></span><i><img src="images/p15.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p16.jpg" alt="" /><b><span></span><i><img src="images/p16.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p17.jpg" alt="" /><b><span></span><i><img src="images/p17.jpg" alt="" /></i></b></a></li>
                <li><a href="#x"><img src="images/p18.jpg" alt="" /><b><span></span><i><img src="images/p18.jpg" alt="" /></i></b></a></li>
            </ul>

    </div>

And here’s the website I’m making for a friend with the gallery in action: http://www.phantomglassstudio.com

  • 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-05-21T02:24:45+00:00Added an answer on May 21, 2026 at 2:24 am

    You can’t really, not with pure CSS – hover is all you’ve got, you would likely need some Javascript or jQuery to add a class to the image being viewed, on hover of it’s thumbnail/trigger – only removing the class when a different image thumbnail/trigger was hovered on (viewed), that way the added "active" class would remain on the last image hovered/viewed

    you would then just style this class the same as your initial :hover effect

    Is Javascript an option?

    with CSS you can achieve something like it but only user clicks the image in which case you can apply the :hover style to the :active and :focus pseudo states of the links – oops sorry just checked your link and I see you are already using the focus and active styles – so it is just the :hover you need to make "sticky"

    Update

    Examples:
    JSfiddle (fullpage) –
    JSfiddle (code and small page only) – had to put it like this to get your base href for images

    it works, but is still not great because as a user would move their mouse off a trigger thumbnail (last image viewed) they will likely hover over others on the way "out", so a click is the best option, in which case CSS does fine 😉

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

Sidebar

Related Questions

web page : http://sideradesign.com/eco-art/gallery/ This code works fine in all brwosers except IE8 (haven't
I have a gallery that's loaded via a BaseAdapter . This works fine. I
I’m trying to get an image using the built in gallery. It works fine
I have a Gallery that works perfectly, except only the first element is ever
I want to use this jQuery gallery more than once on my page: http://workshop.rs/2010/07/create-image-gallery-in-4-lines-of-jquery/
I'm using a jQuery image gallery (in this case, FlexSlider ) to present several
like in this site: http://www.1stwebdesigner.com/resources/57-free-image-gallery-slideshow-and-lightbox-solutions/ it only loads the image when you are rally
I've created small app that works with images from gallery or camera. It all
In my app i am using this code to get Image from Gallery and
Hi have the following function which works fine: jQuery('.btnRemoveItem').click(function(obj){ jQuery(this).closest('li').fadeOut(400, function() { $(this).remove(); });

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.