Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Centering Wrapper in Browser

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24925
    ramonekalsaw
    Member

    I have a web page at http://www.biom.net/index.php/dojo/index/ and as you can see it’s flush left in the browser. I want to center it and have tried adding “auto” to the margin element for both body and wrapper selectors, but can’t get the setting to budge.

    Can you point out where I’m off?

    Code:
    #wrapper {
    position: relative;
    float: left;
    margin: 0 auto;
    padding: 0;
    width: 778px;
    background: #cccc99;
    color: #333;
    border-top: 10px solid #000;
    }

    Thanks.

    #57995
    ramonekalsaw
    Member
    "Preeminent" wrote:
    Is it because of the Float:Left in your code? Does that need to be there?

    Good eye Preeminent. Dumping the float fixed it.

    Thanks!

    Ramone

    #58001
    AshtonSanders
    Participant

    btw, that may not work in IE6 unless the parent element has

    Code:
    text-align:center

    :geek:

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.