Center these two images in css

Discussion in 'CSS' started by fadetoblack22, Jun 15, 2008.

  1. #1
    Could someone please help me with centering the two images "download" and "play now" in the middle of the page: www.my-plague.net

    I have tried with no luck. You probably don't even need to look at the source code as it is a fairly standard thing i think.

    thanks :)
     
    fadetoblack22, Jun 15, 2008 IP
  2. davidspan

    davidspan Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    could put them in a center tag <center> </center>
     
    davidspan, Jun 15, 2008 IP
  3. nyxano

    nyxano Peon

    Messages:
    417
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    An alternative to <CENTER> which uses CSS/DIV is:

    <div style="text-align:center;">
    <img style="border:none;" src="images/download.gif" alt="download" title="download">
    <img style="border:none;" src="images/playnow.gif" alt="playnow" title="playnow">
    </div>
    Code (markup):
     
    nyxano, Jun 15, 2008 IP
  4. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #4
    Invalid HTML.

    Try the way nixano metnioned, and if that didn't work, try:

    
    <div style="display:block;margin:0 auto">
        <img style="border:none;" src="images/download.gif" alt="download" />
        <img style="border:none;" src="images/playnow.gif" alt="playnow" />
    </div>
    Code (markup):
     
    blueparukia, Jun 15, 2008 IP
  5. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,399
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    160
    #5
    Thanks for the help, that works. I did try that to start with and it didn't work. I must have made a typo.

    thanks for the help blueparukia as well.
     
    fadetoblack22, Jun 16, 2008 IP