On 2007-10-14, Jens Müller <me4 (AT) privacy (DOT) net> wrote:
Quote:
Hello,
My <div>-Element should use all the space available in the browser
window, I want no borders on one of the four sides.
With a css padding, border and margin of 0px, I still get a border.
I tried with negative margins, however, this only works for the top and
left borders which now vanish, however doubling the size of the borders
below and right of the <div>-object: |
Negative margins are not a good way to achieve this.
The gaps are due to margin on body. Those gaps may be different in
different browsers depending on their defaults or on how users have set
them up.
Solve the original problem with:
html, body { margin: 0; padding: 0 }
Then you shouldn't need the negative margins.