Lite-Javascript Gallery - Can I position the img absolutely in relationship to the lis?

Posted by blackessej on Stack Overflow See other posts from Stack Overflow or by blackessej
Published on 2010-06-08T20:09:53Z Indexed on 2010/06/08 20:12 UTC
Read the original article Hit count: 208

Filed under:
|
|

I have a lite-javascript run image gallery. The javascript grabs each element in the list and places it as a background in the parent

  • element. Then the CSS styles the thumbnails as small blocks with a defined height/width. A click-event for each
  • object toggles it’s child’s element’s visibility and adds an “active” class name to the
  • . Using CSS, I'm trying to place the absolutely to make it appear at the same position for each thumb, but it's moving in relation to the thumbs.

    Here's the CSS:

    #jgal li {
        background-position:50% 50%;
        background-repeat:no-repeat;
        border:solid #999 4px;
        cursor:pointer;
        display:block;
        float:left;
        height:60px;
        width:60px;
        margin-bottom:14px;
        margin-right:14px;
        opacity:0.5;
    }
    
    #jgal li img {
        position:absolute;
        top:0px;
        left:210px;
        display:none;
    }
    

    And the site: http://www.erisdesigns.net

    Thanks in advance for any help!

  • © Stack Overflow or respective owner

    Related posts about JavaScript

    Related posts about css