Topic: top margin/left margin. (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10778" title="Pages that link to Topic: top margin/left margin. (Page 1 of 1)" rel="nofollow" >Topic: top margin/left margin. <span class="small">(Page 1 of 1)</span>\

 
jive
Paranoid (IV) Inmate

From: Greenville, SC, USA
Insane since: Jan 2002

posted posted 07-26-2002 19:24

I'm having a hard time with something. I'm trying to get the same effect with:

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

but on a stylesheet instead. I've tried:

body {
background-color: 30C0FF;
font-family: Times New Roman, Serif;
font-size: 8pt;
left: 0px;
position: absolute;
top: 0px;
left-margin: 0px;
top-margin: 0px;
margin-width: 0px;
margin-height 0px;

}


but it doesn't seem to work. What I'm trying to do is but a top bar on the very top of the page with no pixels on the margin. What am I doing wrong...??

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-26-2002 20:08

margin-top, margin-left. There is no margin-width or -height.

You may just want to say

margin:0px;

to remove the margins on all sides.

Now, that said, technically that space around the edge of the document is *padding*, not a margin. So I usually say

padding:0px;

when I want the body to have no padding. Actually, I set both padding and margin to zero, since I'm not sure what browsers work which way, and it never seemed worth finding out.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 07-26-2002 21:53

Just to clarify: Setting margin to zero works in IE and NS6 and Opera requires that you set padding to 0 too (something which caught me out first time round). Neither approach will work in NS4.x or early versions of IE.

[edit: it is in the FAQ:
http://faq.ozoneasylum.com/451/

for future reference ]

___________________
Emps

FAQs: Emperor



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu