Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Help with centering a ad

    I have a hostgator banner at the bottom of my website (revieoo.com) and I can not get it to center! I tried using the img align tag but I forgot that it was depreciated.

  2. #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,911
    Thanks
    23
    Thanked 1,874 Times in 1,858 Posts
    Hello KeenanLukey,
    To center an element you need three things:
    1. a valid DocType
    2. an element with a width
    3. that elements right/left margins set to auto


    You just need to give that anchor an id so you can specifically target it and nothing else on your page.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use a DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  3. Users who have thanked Excavator for this post:

    KeenanLukey (03-09-2013)

  4. #3
    New Coder
    Join Date
    Nov 2012
    Location
    India
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Try to set you div class using padding to make it center or you can set div width and give in css align center.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •