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 9261399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:08:13+00:00 2026-06-18T13:08:13+00:00

I have an image gallery that is dynamically loaded with php. In chrome it

  • 0

I have an image gallery that is dynamically loaded with php. In chrome it looks like so:

In ie8 it looks like so:

The HTML and PHP is as follows:

while($row = mysql_fetch_array($result)) {

$parent = $row["parent_business_id"];
$image = $row["image_url"];
$alt = $row["alt_tag"];
$description = $row["description"];
$thumb = $row["thumb_url"];
$business = $row["business"];

$mainthumb = "./images/270x270/$image.jpg";

echo

"<li>

<div class='gallery_image_container'>

<a href='business-profile.php?business_id=$parent' class='gallery_darken'><img src='$mainthumb' alt='$alt' title='$description' /></a>

</div>

</li>";

}

?>

And the CSS is like so:

.gallery_container {
margin: 0 0 0 -10px;
padding: 0;
list-style: none;
}

.gallery_container > li {
margin: 0 0 0 10px;
padding: 0;
float: left;
display:inline;
}

div.gallery_image_container{
width:270px;
height:270px;
padding:20px;
margin-bottom:10px;
background-color:white;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: rgba(0,0,0,.2) 0px 0px 6px;
-moz-box-shadow:  rgba(0,0,0,.2) 0px 0px 6px;
box-shadow:  rgba(0,0,0,.2) 0px 0px 6px;
float:left;
display:block;
}

a.gallery_darken {
display: block;
background: black;
padding: 0;
width:270px;
height:270px;
float:left;
}

a.gallery_darken img {
display: block;
-webkit-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
-o-transition: all 0.5s linear;
transition: all 0.5s linear;
}

a.gallery_darken:hover img {
opacity: 0.7;
}

I’m uncomfortable about using divs within li items but am unsure of what other methods I can use to add the borders and shadows so it may be that this is the root of the problem. I would essentially like the gallery to look the same in ie8 as it does in chrome but having tried adding float:left and display:inline to the containing divs and images I am at a loss as to why the images will not line up in ie8. Any help would be much appreciated.

  • 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-06-18T13:08:14+00:00Added an answer on June 18, 2026 at 1:08 pm

    Based on what you want to see, I think you are floating too much. Only use floats when you need to, and make sure to clear them afterwards. Try this:

    HTML:

    <ul class="image-gallery">   
        <li>
            <a href="#" title="Click me!"><img src="somesource.png" alt="Description" /></a>   
        </li>
    
      <!-- repeat for each image -->
    
        <li>
            <a href="#" title="Click me!"><img src="somesource.png" alt="Description" /></a>
        </li> 
    </ul>
    

    CSS:

    ul.image-gallery { 
      list-style: none; 
      margin: 0; 
      padding: 0; 
      overflow: hidden; /* clear floats */
    }
    ul.image-gallery li {
      width:270px;
      height:270px;
      float:left;
      padding:20px;
      margin: 0 10px 10px 0;
      background: #ffffff;
      border-radius: 3px;
      box-shadow:  rgba(0,0,0,.2) 0px 0px 6px;
    }
    ul.image-gallery a {
      display: block;
      transition: all 0.5s linear;
    }
    ul.image-gallery a:hover {
      opacity: 0.7;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple image gallery dynamically controlled by PHP to add and remove
I have a gallery of products that is dynamically created using php and mysql
I have a PHP script that initialises an image gallery. It loops through all
I have an image gallery that I created by reading the contents inside a
I have an image gallery app that has a slider to control the width
Does anyone have a suggestions for a superb cool image gallery that I can
what i want to do is that i have a nice image Gallery which
I have photo gallery code that does image re-sizing and thumbnail creation. I use
I have a PHP photo gallery that reads the GPS coordinates from images. I'd
I have a image gallery like Google+ or Facebook and i want to avoid

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.