#1
  1. No Profile Picture
    Polymath
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Location
    Indiana
    Posts
    20
    Rep Power
    0

    CSS, Layout, and Cross-browser problems


    I am building a template-like page that is separated into 3 main sections. The first DIV is across the top for the logo and a horizontal menu. The second DIV is along the left, for a vertical menu. The third DIV is for the content and is position:absolute so that the top left corner of it is just below the top DIV and just to the right of the left one (left:150px).

    The content DIV needs to take up the remaining width of the screen (after the 150px) and all content needs to be centered in it.

    The problem I'm having is that on some browsers (Mac IE, for example) it renders properly with the content DIV set with text-align:center. On a PC, though, the content still gets pushed all to way to the left, no centering at all. I've even tried align="center" to no avail.

    The only thing that seems to work is to put a table inside the content DIV (with width=100% align=center) and then the content inside the table, but there should be a better way.

    Any suggestions?

    Thanks!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    afaik there is no better way. most times, if you find ONE way that works for all browsers, you should be happy... for many things there is none but to do browser-detection

IMN logo majestic logo threadwatch logo seochat tools logo