Jump to content

CSS appears to hide dynamic links on images except for the last one


MattLauder

Recommended Posts

Im rebuilding my website and have decided to make the dynamic images for my main photography gallery be layed out using div tags and css.

 

I can get the images to load in and layout correctly but for some reason the links on the images only work on the last loaded in image. I check the code on the page and all the links are there but only the last one is active.

 

The code worked when it was all wrapped in table tags.

 

This is the css code I am using for this section is:

 

#maincontent{width:1000px;margin:0 auto;padding:0 20px}

 

#maingallery{height:382px;position:relative;width:1000px;text-align:center;margin-top:15px}

#maingallery #text{position:absolute;top:50px}

.gallery_item {float:left; margin: 20px 0 0 0; width: 200px; height: 67; padding: 0 10px 0 10px}

.gallery_item .p {padding: 10px; font-size:12px}

.gallery_item a:hover, a:active { display : block; border : none; }

 

Any help would be greatly appreciated. When I turn off the css for the divs the links are active, but obviously no styling. I'm missing something.

 

Thanks

 

Matt

Link to comment
Share on other sites

This is the page code:

   

<div id="maingallery">

<div class="gallery_item">

<p><a href="gallery.php?category=<?=$category?>"><img src="http://www.australianstockimages.com.au/images/photos/<?=$imghome?>" width="200" height="67" alt=""></a></p>

<p><?=$category?></p>

</div>

   

    <?php

          if ($count == 4) {

            echo "</tr>\n<tr>\n";

    $count = 0;   

          }

    $count++;

}

          ?>

 

</div>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.