Forum Moderators: open

Message Too Old, No Replies

Firefox Top Margin Help

         

e_consult

12:19 am on Feb 9, 2006 (gmt 0)

10+ Year Member



Hi,

My top margins look perfect in IE, but in Firefox they are all messed up. I'm using basic HTML:
<body topmargin="30%" rightmargin="10" leftmargn="0">

Can anyone help me with this?

Thanks in advance.

iamlost

1:03 am on Feb 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to WebmasterWorld, e_consult!

TOPMARGIN and LEFTMARGIN are old proprietary IE.
MARGINHEIGHT and MARGINWIDTH were the old Netscape equivalents.

None are valid HTML 4.01. Not even transitional.
I suggest you update your knowledgebase.

The easiest solution is to use CSS.
inline CSS:
<body style="margin: 30% 10px;">
or add this to your <head>:
<style type="text/css">
body {margin: 30% 10px;}
</style>

e_consult

1:31 am on Feb 9, 2006 (gmt 0)

10+ Year Member



Hi iamlost,

Thank you for the advice. Now everything looks perfect in Firefox, but for some reason my left and right margins are messed up on some pages in IE. I used this code: body {margin: 3%;} in the style tags. Any advice?

encyclo

1:40 am on Feb 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could try the following:

<body style="margin:30% 3% 0;">

The series of values goes clockwise from the top, so the above gives a top margin of 30%, a right margin or 3%, a bottom margin of zero, and the left margin will be the same as the right margin. :)

e_consult

1:53 am on Feb 9, 2006 (gmt 0)

10+ Year Member



Thank you so much for your replies - for some reason these changes are not making anything change in IE and I have no idea why? I must be doing something fundamentally wrong. Here is what I have for my style tags: (I now want a 3% margin on all sides, that looks the best) Any ideas on what the heck I keep doing wrong?

<style type="text/css">
<!--
body {margin: 3% 3% 3%;}
body,td,th {
color: #000033;
font-family: Georgia, Times New Roman, Times, serif;
font-size: 11pt;
}
body {
background-color: #000033;
background-image: url();
}
.style2 {color: #000033}
.style3 {color: #FFFFFF}
.style7 {
color: #000000;
font-weight: bold;
font-size: 9pt;
}
.style8 {color: #000033; font-size: 9pt; }
.style9 {font-weight: bold; color: #000000;}
.style14 {font-size: 14px}
.style15 {color: #FFFFFF; font-size: 11pt; }
a:link {
color: #FFFFFF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #99CCCC;
}
a:active {
text-decoration: none;
color: #FFFFFF;
-->
</style>

e_consult

2:07 am on Feb 9, 2006 (gmt 0)

10+ Year Member



I think I figured it out! Thank you so much for the advice!