Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: not2easy
My question is in order to have a 1024px is the proper way of doing this is subtracting the padding and margin sizes from 1024? In this case below subtracting 17 from 1024 = 1005px.
margin-left: auto ;
margin-right: auto ;
[edited by: Kahless at 3:47 am (utc) on Mar. 28, 2009]
I don't understand how you got to the 17px (adding top padding and left margin hardly makes sense, so I don't get where it comes from)
colleft and colright were wrapped in wrap div. I do not want anything to exceed 1024px. But thought if I set wrap to 1024 and I have margin/padding set in colleft and colright it will exceed 1024px. Therefore I think I need to set the wrap div to 1007 instead of 1024?
The problem I have is anytime I do anything in CSS with divs everything keeps exceeding 1024px. Even if I set max-width and wrapper to 1024px. So I am assuming I must subtract any padding and margins in divs to set the maximum width.
For positional elements I always use margins as I find paddings can cause a number of problems in IE but you need to be aware that even margins are not completely exempt as you see from above.