Centering content over a div

Discussion in 'CSS' started by D.Erickson, Nov 8, 2010.

  1. #1
    Hi all,

    I'm currently building a website using z-index to place my content over a stretched background image.

    The image position is fixed and the container div position is absolute... All of the divs within the container are positioned relative.

    When I added 'position: absolute;' to the container, it automatically moved to the left hand side of the page, enough though I added 'margin: 0 auto;' and 'float:center;'.

    Does anyone know why this might be happening? If you want to view the website, please send me a private message and I'll send you the link. Any help would be appreciated!

    Thanks,

    D.Erickson :confused:
     
    Last edited: Nov 8, 2010
    D.Erickson, Nov 8, 2010 IP
  2. usasportstraining

    usasportstraining Notable Member

    Messages:
    4,876
    Likes Received:
    363
    Best Answers:
    0
    Trophy Points:
    280
    Articles:
    4
    #2
    Could you put the content outside of the div and center above?
     
    usasportstraining, Nov 8, 2010 IP
  3. D.Erickson

    D.Erickson Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the help, I did some more research on Google and found a solution :)
     
    D.Erickson, Nov 8, 2010 IP