1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS image "hover-enlarge-position" problem

Discussion in 'CSS' started by kuman, Apr 10, 2008.

  1. #1
    hi guys...

    in my CSS learning process i lern to use another thing in my BETA wbsite.. image enlarge when hovering... but now i faced this problem with it...

    please refer to my Beta site for the problem at the near bottom of the page.

    Problem
    1 - To display the enlarge image properly. How to make that the position for every "enlarged" image it must begin at the left side of the screen (next to the thumbnail image) and if possible at the center of the current view.
    2 - and how to make the image to display properly so that the blocked image will not block the next image.
    3 - If anyone got a better way to do this do share.. :)

    here is the actual address
    http://kumanworks.110mb.com/Version2/Completed/compMKM.htm

    here is the css code for it

    /* Show thumbnail in the page */
    .thumbnail
    { float:left;
    width:120px;
    border:1px solid #999;
    margin:0 15px 15px 0;
    padding:5px;
    font-size:70%;
    }
    
    .clearboth {clear:left;}
    /* END thumbnail in the page */
    
    /* thumbnail image enlargement */
    .thumbnailEnlarge{
    position:relative;
    z-index:0;
    }
    
    .thumbnailEnlarge:hover{
    background-color:transparent;
    z-index:50;
    }
    
    .thumbnailEnlarge span{ /* Css for enlarged image */
    position:absolute;
    background-color:#4D99EE;
    padding:5px;
    left:50px;
    border:1px dashed gray;
    visibility:hidden;
    color:black;
    text-decoration:none;
    
    }
    .thumbnailEnlarge span img{ /* CSS for enlarger image */
    border-width:0;
    padding:2px;
    }
    
    .thumbnailEnlarge:hover span { /* CSS for enlarged Image on hover */
    visibility:visible;
    top:0;
    left:10px;
    top:-200px; /* placed the enlarged image to the top of the thumbnail */
    }
    /* end thumbnail image Enlargement */
    
    Code (markup):
    and here is the html for it
            <div class="thumbnail"><a class="thumbnailEnlarge" href="images/tudmMKM/WIP/undernoseantn.JPG">
    		<img height="90" alt="" width="120" border="0" src="images/tudmMKM/WIP/undernoseantn.JPG" /> 
    		<span><img alt="" src="images/tudmMKM/WIP/undernoseantn.JPG" /><br/>
            Front MAWS Antenna under the radome</span></a> Front MAWS Antenna under the radome</div>
    Code (markup):
    hope anyone can help me on this...

    and thanks in advance for all the help
    and if more information is needed, let me know :D

    kuman
     
    kuman, Apr 10, 2008 IP