View Full Version : CSS margin and padding in Netscape

12-15-01, 02:32 AM
How do I get them to work, I need it for layout purposes and since it doesn't work, my layout doesn't align with the background in Netscape. padding and margin doesn't seem to have an effect in Netscape.

12-17-01, 05:38 PM
Try this:

<style type="text/css">

p.paragraphtwo { margin: Sem; }
H2 { margin: 1em }
p.copy {
margine-top: Sem;
margin-bottom: percentage; \\percentage being 10; or whatever
margin-left: percentage;
margin-right: percentage; }

<p class="copy">bla bla bla....</p>

<p class="paragraphtwo">Bla bla bla....</p>

Instead of percentage you can use length (300px;) or auto.
eg. margin-left: 10%; or 8em;

But Netscape displays code differently than ie. try to use netscape4 and up.

Padding: the space between the border and the content of the element.
Margin: Separate one element from other elements.