no top or side margins please

liunx

Guest
How to I set a page up to have no margins? My tables don't quite reach the top and sides of the screen. <br />
<br />
They must they must.<br />
<br />
Nippi<!--content-->To get rid of those margins put this code inside your <body> tag <br />
<br />
leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"<br />
<br />
Here is an example of the above code inside the body <body> tag.<br />
<br />
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><!--content-->inside your opening body tag add:<br />
<br />
topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0<br />
<br />
in some cases you may also have to add<br />
<br />
bottommargin=0<br />
<br />
I hope this helps.<!--content-->ohhh, posted in the same minute :) well done fredrick.<!--content-->ta both of you<br />
<br />
Lovely<!--content-->WOW! Two posts with the same reply in the same minute.This is the first time this has happend to me:)<!--content-->I don't think you can get rid of the left and top margin in Netscrap 4.x. Is that correct?<!--content-->Originally posted by torrent <br />
I don't think you can get rid of the left and top margin in Netscrap 4.x. Is that correct? <br />
<br />
Not sure if Netscrap supports those tags.Netscape does :)<!--content-->It depends what you mean by "supports" them. If you set the attributes and then view them in NN4.x I think you will see that you are still left with a left and top margin! You certainly are when you do it through CSS (redefine the body tag). :cool:<!--content-->The coding posted by fredricknish will handle both IE and Netscape (even version 4).<br />
<br />
Using CSS, N4 will not support the margins.<!--content-->Originally posted by <htmlite> <br />
The coding posted by fredricknish will handle both IE and Netscape (even version 4).<br />
<br />
Using CSS, N4 will not support the margins. <br />
<br />
yeh <htmllite> is correct.NS4 wont support CSS<!--content-->Originally posted by fredricknish <br />
<br />
<br />
yeh <htmllite> is correct.NS4 wont support CSS <br />
ummmm correction, NS4.xx will supoort some CSS.<br />
;)<!--content-->Originally posted by scoutt <br />
<br />
ummmm correction, NS4.xx will supoort some CSS.<br />
;) <br />
<br />
I meant CSS for the margins.<!--content-->According to <!-- w --><a class="postlink" href="http://www.htmlgoodies.com/tutors/nomargins.html">www.htmlgoodies.com/tutors/nomargins.html</a><!-- w -->, where I got this code from from, it works in Netscape 4.0 and up and Internet Explorer 3.0 and up.<br />
<br />
I added some stuff to it and I guarentee it works in NN 4.73 and IE 5.5 ('cause I test it in those).<br />
<br />
<br />
<HTML><br />
<HEAD><br />
<title>...</title><br />
<STYLE TYPE="text/css"><br />
<!--<br />
BODY {margin: 0}<br />
--><br />
</STYLE><br />
</HEAD><br />
<br />
<BODY spacing="0" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"><br />
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0"><br />
<tr> <br />
<td width="100%"><br />
... your stuff ...<br />
</td><br />
</tr><br />
</table>All these attributes added together make it the most compatible. Start taking parts ABC away and you lose compatibility in browser XYZ.<br />
<br />
I vaguely remember<br />
In Netscape cellpadding and cellspacing by default are 1, in IE default 0. And something like that with border too.<br />
I'm too tired to remember but that might be backwards..<br />
<br />
---<br />
<br />
I have a semi-related thread at <!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=10108">http://www.htmlforums.com/showthread.ph ... adid=10108</a><!-- m --> about making sure a cell stays on the very far right all the time, NN and IE, older browsers too.<!--content-->
 
Back
Top