PDA

View Full Version : What is happening????


moviemastersdk
12-25-2011, 01:50 PM
Allright, i made this website using div's,

in the normal view, it looks like this
http://i40.tinypic.com/2n99kax.png

but when i switch to live view
i get these spaces between the top middle and bottom section
http://i39.tinypic.com/bhgnpk.png

what did i do wrong

almost everything is set to automatic in the div margins
Btw i am using CSS to modify them

DWcourse
12-25-2011, 03:45 PM
We'd need to see the code but it looks like it could be CSS Margin Collapse. Where the margin of an object "overflows" it's container.

To get rid of the space, try adding padding or a border to the containing (middle) div. I'd try 1px of top and bottom padding.

http://www.w3.org/TR/CSS2/box.html#collapsing-margins

moviemastersdk
12-25-2011, 03:54 PM
We'd need to see the code but it looks like it could be CSS Margin Collapse. Where the margin of an object "overflows" it's container.

To get rid of the space, try adding padding or a border to the containing (middle) div. I'd try 1px of top and bottom padding.

http://www.w3.org/TR/CSS2/box.html#collapsing-margins

Dude, you're awesome
the 1 px padding fixed
just for future reference, what is padding ?? :)

DWcourse
12-26-2011, 01:52 AM
check out: http://www.w3.org/TR/CSS2/box.html

basically margin is space outside the object and padding is space inside the object.