how do I align contents of a centered div to the left?

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2012-12-01T16:59:25Z Indexed on 2012/12/01 17:03 UTC
Read the original article Hit count: 184

Filed under:

I have centered a div inside another div but want to left justify the contents of the centered inner div. How can I do this?

My current HTML looks like this:

<div style="border: solid 1px #ff0000;text-align:center;">     
  <div style="border:solid 1px #00ff00;">
      <img src="/some_url_1/" style="width: 80px; height 80px; border: 0"/>
      <img src="/some_url_2/" style="width: 80px; height 80px; border: 0"/>
  </div>
</div>

Currently the images are centered inside the inner div but I would like them aligned to the left inside of the centered inner div.

Any idea what I'm missing?

© Stack Overflow or respective owner

Related posts about css