I need to center my container with images on both sides

Discussion in 'CSS' started by Pizzaman1123, Jan 5, 2013.

  1. #1
    So I want this container to center and both images on either side. I can get this done with floating but when the browser is re-sized everything floats down, how can I change this so when the browser is re-sized or in a different view, everything stays in center?

    Here is what I got so far. [​IMG]
     
    Pizzaman1123, Jan 5, 2013 IP
  2. Pizzaman1123

    Pizzaman1123 Peon

    Messages:
    219
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Got it figured out :)
     
    Pizzaman1123, Jan 6, 2013 IP
  3. AlaskaWebDesign

    AlaskaWebDesign Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How did you figure it out without tables?
     
    AlaskaWebDesign, Jan 8, 2013 IP
  4. sadamsam

    sadamsam Greenhorn

    Messages:
    9
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    13
    #4
    Give the image in separate <div>. Then write the code for image in CSS.

    For example,

    .divname img
    {
    margin:10px 10px 10px 10px; // (top,right,bottom,left)
    }

    adjust the size.
     
    sadamsam, Jan 10, 2013 IP
  5. lang_tu_ntt

    lang_tu_ntt Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    .container {
    margin: 0 auto;
    }

    should work in this case
     
    lang_tu_ntt, Jan 11, 2013 IP