How To Align Advert Into The Middle

Discussion in 'HTML & Website Design' started by stuartfredman, Jul 30, 2010.

  1. #1
    I am pretty sure this is basic but we need your help.

    how can you align adverts into the middle of a page?

    On the link below, all the header banners and adverts on the post are to the left. how can you move them into the middle?

    http://www.thehiphopchronicle.com/2010/07/30/mr-hudson-love-never-dies/

    help please!
     
    stuartfredman, Jul 30, 2010 IP
  2. Zeh.

    Zeh. Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <div style="text-align: center">centered content</div>
    HTML:
     
    Zeh., Jul 30, 2010 IP
  3. MotocrossJoe88

    MotocrossJoe88 Peon

    Messages:
    143
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can try the old <center> CONTENT </center> tags.
     
    MotocrossJoe88, Jul 30, 2010 IP
  4. stuartfredman

    stuartfredman Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok. i was trying <center> content <center>. i forgot to put in the bracket

    THANK YOU SO MUCH! It worked!
     
    stuartfredman, Jul 31, 2010 IP
  5. devgex.com

    devgex.com Well-Known Member

    Messages:
    193
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    133
    #5
    The <center> tag gets the job done, but the correct, standarded way to do it is:
    
    <div style="text-align:center; width:100%">
           <div style="margin:auto">Your advert here.</div>
    </div>
    
    Code (markup):
     
    devgex.com, Jul 31, 2010 IP