Image is loading but not showing

I have a very weird problem and I just can’t seem to be able to find a fix.
When I load a post on my site, it’s supposed to show a main image, and any other uploaded images below it. The main image loads/shows fine, but all other images related to that post load but don’t show on the page.

The container for the images loads too, so you I can see that there’s an empty space where the images should have loaded. If I “inspect Element” I can clearly see that the image exists, and hovering over the line marks the container. I can also see that the image has loaded successfully (200). If I make any live CSS changes via the “Inspect Element”, the images pop up and shows fine.

Read More

I have a feeling it’s a CSS issue, but nothing I’ve tried seems to work. Any help is greatly appreciated.

PHP:

<?php
                    
        $arr = AuctionTheme_get_post_images(get_the_ID(), 4);
        if($arr)
        {
                      
        echo '<ul class="image-gallery">';
        foreach($arr as $image)
        {
        echo '<li><a href="'.AuctionTheme_wp_get_attachment_image($image, array(900, 700)).'" rel="image_gal1">'.wp_get_attachment_image( $image, array(130, 96) ).'</a></li>';
        }
        echo '</ul>';
                  
        }
                  
?>

CSS:

.image-gallery {
    list-style-type: none;
    overflow: hidden;
    margin: 10px 0 0;
    padding: 0;
    text-indent: 0
}

.image-gallery li {
    float: left;
    display: block;
    margin-right: 5px;
    margin-left: 0;
    min-height: 106px;
    min-width: 145px
}

.attachment-130x96 {
    max-width: 130px;
    max-height: 130px;
    width: auto;
    height: auto;
    margin: 0;
    display:block;
}

Screen Shots:

This is how the post shows when the page loads

This is how the post shows before making any live CSS changes


The images shows after the slightest CSS change

The images shows after the slightest CSS change

Related posts