2 Replies - 499 Views - Last Post: 24 April 2012 - 09:10 AM

#1 don57  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 15-March 12

Centering 2 images horizontally

Posted 23 April 2012 - 10:10 AM

I am trying to center 2 images side by side inside the center column of a page. I can center a single one just fine but the margin-right; auto and margin-left; auto don't seem to work with 2 images.


          <div id="snap_center_column">

             <br>
             <h1>VLC Player</h1>

             <br><br>
             <img class="displayed" src="vlc1_small.png" alt="Configure" height=274 width = 325 />

             <img class="displayed" src="vlc2_small.png" alt="Configure" height=264 width = 325 />
          

          </div><!-- ends snap_center_column -->



IMG.displayed {

    display: inline;
    margin-left: auto;
    margin-right: auto;
}




Is This A Good Question/Topic? 0
  • +

Replies To: Centering 2 images horizontally

#2 floppyspace  Icon User is offline

  • D.I.C Head

Reputation: 25
  • View blog
  • Posts: 184
  • Joined: 04-February 10

Re: Centering 2 images horizontally

Posted 23 April 2012 - 07:31 PM

What is in the snap_center_column?

When you call your displayed div's they are treated as individual frames.

Without going into details this should help solve your problem.
Was This Post Helpful? 0
  • +
  • -

#3 don57  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 15-March 12

Re: Centering 2 images horizontally

Posted 24 April 2012 - 09:10 AM

This did the trick


IMG.displayed {

    clear: all;
    display: inline;
    margin-left: auto;
    margin-right: auto;
}







Was This Post Helpful? 0
  • +
  • -

Page 1 of 1