View Full Version : Is 'Leftmargin" a body tag attribute
Richard
05-04-2003, 08:49 PM
Are "LEFTMARGIN", "TOPMARGIN", "MARGINHEIGHT" and "MARGINWIDTH" <body> tag attributes or are they some of the rubbish that FP 2000 just puts in ?
liorean
05-04-2003, 08:59 PM
They are Microsoft's (leftmargin, topmargin) and Netscape's (marginwidth, margintop) own pre-css html extensions for changing the margin/padding of the html/body elements.
The four margin errors can be replaced with a little bit of CSS code instead. Put this is a text file, with a name ending in .css:
body {
margin: 0px;
padding: 0px;
}
You should export the CSS to an external file and call it with a one line instruction in the <head> section:
<link type="text/css" rel="stylesheet" src="/path/file.css">
External CSS files must not contain any HTML tags or code.
James
05-11-2003, 02:32 PM
Originally posted by giz
The four margin errors can be replaced with a little bit of CSS code instead. Put this is a text file, with a name ending in .css:
body {
margin: 0px;
padding: 0px;
}
You should export the CSS to an external file and call it with a one line instruction in the <head> section:
<link type="text/css" rel="stylesheet" src="/path/file.css">
External CSS files must not contain any HTML tags or code.
Or you could put the code in the head section of the html document.
<style type="text/css">
body {
margin: 0px;
padding: 0px;
}
</style>
But an external style sheet is better.
Richard
05-11-2003, 02:35 PM
Thanks.. I will use CSS in future (which I already knew very well how to use;):p)
>> Or you could put the code in the head section of the html document. <<
External file is better, as you can change the style of the whole site by altering this one file. Additionally the file will be cached so will only need to be served once per visitor, rather than with every page access.
Richard
10-31-2004, 01:43 AM
I didn't use it in the end but i'm now working on another site and trying to use as much CSS as possible. But the margin / padding thing doesn't seem to be working..?
liorean
10-31-2004, 03:28 PM
Thread digging, aye?
Can you be more specific about your problem? Perhaps show us the code or a link to an example page?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.