Results 1 to 2 of 2

Thread: center positioning

  1. #1
    Join Date
    May 2005
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default center positioning

    i am making a site that is centerd in the browser. i usually use absolute positioning, but this doesnt work since it needs to be centered. i tried relative positioning, and used negative numbers to overlay a picture. this doesnt seem optimal, also because the browser continues to scroll down to the point where it should be. is there a diiferent slution that i am overlooking?
    thank you

  2. #2
    Join Date
    Aug 2005
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi there.

    GIve your content a wrapper div with the following:

    #wrapper {
    positioned: relative;
    width: xxxxpx;
    height: auto;
    margin: 0px auto;
    }

    set the body to:

    body {
    text-align: center;
    }

    This works fine in all browsers,
    hope it helps mate

Bookmarks

Posting Permissions

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