the best way center 2 divs inner div. Like this
1 2 3 4 5 6 7 8 9 10 11 12
1 ---------------------------
2 - main div -
3 - ------ ------ -
4 - -div1- -div2- -
5 - ------ ------ -
6 - -
7 ---------------------------
Width and Height of main div is fixed.
thanks
How about this? The only fixed thing you need to set are the margins of the inner div’s, but this shouldn’t harm as you didn’t tell about any restrictions in the margins in the comments on this topic. As to the styles, only the borders are purely presentational, the remaining are the minimum required styles.
I should add, the strict doctype is very important, otherwise this ain’t going to work in IE due to the box model bug.