Note that there are some explanatory texts on larger screens.

plurals
  1. POI need to center multiple images that each have their own div tag, within the container
    primarykey
    data
    text
    <p>I am trying to figure out how to center images located within their own , center them within the container. I have 8 images in 2 columns, 2 images per row left aligned. I need them centered aligned.</p> <p>I found a way to center here: <a href="https://stackoverflow.com/questions/9434022/aligning-multiple-images-horizontally-in-the-center-of-a-div">Aligning multiple images horizontally in the center of a div</a></p> <p><em>Floating a block level item will push it to the left or right. "display:inline-block" on the IMG. And remove the float and position statements. Then "text-align:center" for the container div.</em></p> <p>But that way puts all the images into a single column. Any help would be appreciated.</p> <p>Here is my CSS controling the container and the images:</p> <pre><code>.container { width: 452px; height: 750px; margin-right: auto; margin-left: auto; margin-top: 20px; margin-bottom: 5px; font-size: 11px; } .item a img { width: 150px; height: 160px; box-sizing: border-box; float: left; padding: 3px; background-color: #FFF; margin: 5px; border: 1px solid #cccccc; -moz-border-radius: 3px; -webkit-border-radius: 3px; -khtml-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 0 5px rgba(0,0,0,0.45),0px 1px 2px rgba(0,0,0,0.2); -webkit-box-shadow: 0 0 5px rgba(0,0,0,0.45),0px 1px 2px rgba(0,0,0,0.2); box-shadow: 0 0 5px rgba(0,0,0,0.45),0px 1px 2px rgba(0,0,0,0.2); filter: alpha(opacity=100); -moz-opacity: 1; -khtml-opacity: 1; opacity: 0.7; } </code></pre> <p>Here is the html:</p> <pre><code>&lt;div class="container clearfix"&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/01.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/01t.jpg" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/02.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/02t.jpg" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/03.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/03t.jpg" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/04.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/04t.jpg" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/05.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/05t.jpg" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/07.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/07t.jpg" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/06.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/06t.JPG" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt; &lt;div class="item"&gt;&lt;a rel="clearbox[gallery=Gallery,,comment=Dirty South Ink Tattoo Shop Photo]" href="../images/Dustin/10.JPG" title="Dirty South Ink Tattoo Shop Photo"&gt;&lt;img class="border" src="../images/Dustin/thumbs/10t.jpg" alt="Dirty South Ink Tattoo Shop Photo" /&gt;&lt;/a&gt;&lt;/div&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload