How can I align these image?

Discussion in 'HTML & Website Design' started by shadow689, Jun 18, 2011.

  1. #1
    Hello,

    I would like to align these images horizontally with a little space between them.

    [​IMG]

    I'm using blogger platform

    I really need your help.

    Thanks
     
    Last edited: Jun 18, 2011
    shadow689, Jun 18, 2011 IP
  2. tks

    tks Well-Known Member

    Messages:
    89
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    108
    #2
    Place it inside a div container, specify width of the div to display all your pics horizontally with spaces in between.
     
    tks, Jun 18, 2011 IP
  3. shadow689

    shadow689 Peon

    Messages:
    70
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Can you please show me how to do that because I'm a beginner in html and CSS
     
    shadow689, Jun 18, 2011 IP
  4. Guru_101

    Guru_101 Member

    Messages:
    51
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    You can use old-school HTML to build a table containing the images:

    <table>
    <tr>
    <td><img src="image1.gif"/></td>
    <td><img src="image2.gif"/></td>
    <td><img src="image3.gif"/></td>
    <td><img src="image4.gif"/></td>
    <td><img src="image5.gif"/></td>
    <td><img src="image6.gif"/></td>
    <td><img src="image7.gif"/></td>
    </tr>
    </table>
    Code (markup):
    Or you can use CSS to align the images, via floating them:

    HTML:

    <div id="images">
    <img src="image1.gif" />
    <img src="image2.gif" />
    <img src="image3.gif" />
    <img src="image4.gif" />
    <img src="image5.gif" />
    <img src="image6.gif" />
    <img src="image7.gif" />
    </div>
    
    Code (markup):
    CSS:

    #images img { float: left; border: none; }
    Code (markup):
    You'll want to make sure you're clearing these images before displaying any further content to keep everything aligned properly.
     
    Guru_101, Jun 18, 2011 IP
  5. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #5
    with float: left.
     
    twowebros, Jun 20, 2011 IP
  6. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #6
    for example.
    if you are using code.
    <div id="container">
    <img src="image1.gif" />
    <img src="image2.gif" />
    <img src="image3.gif" />
    <img src="image4.gif" />
    <img src="image5.gif" />
    <img src="image6.gif" />
    <img src="image7.gif" />
    </div>


    use css..

    #container img { float: left; border: none; }

    thanks

    2webros
     
    twowebros, Jun 20, 2011 IP