Centering DIVs

Discussion in 'CSS' started by johnmr, Sep 8, 2006.

Thread Status:
Not open for further replies.
  1. #1
    I am building an interface where I have a DIV that gets made visible when you roll over a certain area. The div contains some nav elements, which are jscript rollovers themselves. I've got the code working to hide and show the DIV and to do the rollovers (I've only done the one in the upper left). Here is what it looks like so far:

    http://www.artntech.com/sample/index.html

    The problem is, I really want the design to be centered, and since I am using absolute positioning for the DIV, this creates a problem. Here is what it looks like when I center the underlying table:

    http://www.artntech.com/sample/index2.html

    I'm pretty new to all his, and am stumped as to how to get that DIV element to center and align with the underlying table (since it is centered, I can't really predict exactly where it will be in the window).

    I've seen articles saying this kind of thing can be one with CSS and have tried several of the samples I've seen with no luck. Anyone know of a good way to do this? Any help greatly appreciated.

    Thanks

    Johnmr

    *
     
    johnmr, Sep 8, 2006 IP
  2. Sanzo

    Sanzo Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #2
    have you tryed
    margin:0 auto;
    ?
     
    Sanzo, Sep 9, 2006 IP
Thread Status:
Not open for further replies.