SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jun 2003
    Location
    Vienna
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question tableless page final touch

    Hello everyone!

    Well... I have pretty much spent the weekend converting my website from tables into a css. Now after I have read the whole forum on css here and tons of other tut's I still cannot think of how to center my page. In other words, there is still one main table on my site, with the 750px column in the middle, and two resizible at the sides.

    Any ideas how to do this? I have tried:

    body { text-align: center }

    it worked just in IE. One of the people on this forum said that it is a microsoft feauture and that normally it shouldn't because block elements cannot be aligned with text-align. Anyway, what I need is a container that will regardlessly of the screen size and resolution stay in the middle.

    If anyone can help I will greatly appreciate it.

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    add margin:auto; to your <body> tag rules, which will cover the other browsers (Mozilla, Opera, etc.).

  3. #3
    SitePoint Member
    Join Date
    Jun 2003
    Location
    Vienna
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey vgarcia!

    Thanks for the tip man, works great. Only one thing, when I added it to the <body> tag it didn't do anything, but then I created a <div> container and added it to <div> properties so then it worked. Thanks a lot, you saved me a lot of time and nerves... bye


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
  •