1

(8 replies, posted in Programming)

It might be this: When you add borders to an element with CSS, the width of height of the border is added to the total width or height of the object. A box of 100px width with a border of 5px on al sides will become 110px wide (100 + 5 + 5).
There is a very annoying bug in IE5 which does not respect the CSS rules: http://tantek.com/CSS/Examples/boxmodelhack.html

sif wrote:

And will this work if i want to center the all pages:

#punwrap {width: 650px; center}

Otherwise, what do i need ?

Centering with CSS can be done in 2 ways. The first (this one is neat and is valid CSS but won't work in IE < 6):

#punwrap {
width: 650px;
margin-left: auto;
margin-right: auto;
}


2nd way of centering:

#punwrap {
position: relative;
left: 50%;
top: 12px;
width: 650px;
margin-left: -325px;
}