...

View Full Version : margins



ajthornton
12-01-2005, 06:35 PM
I know html and am trying to learn php and css. I want to get away from the old
<body bgcolor="#000000"> and use styles. I am having trouble figuring out ho to do margins this way. I want know margin, yes I have a reason. Can anyone help. Below is what I am trying to do.

<body style="background:#FFFFFF;margin-left=0cm">

artman 186
12-01-2005, 09:30 PM
Don't use "=" operator in a stylesheet =]

Instead of margin-left=0cm you want

margin-left: 0cm (or px or em or whatever units you're using);

Graft-Creative
12-01-2005, 09:39 PM
<body style="background:#FFFFFF;margin-left=0cm">

Simple:


body {
background:#fff;
margin-left: 0;
}


No need to declare units on the 0: 0 is 0 anyway.

Gary

mark87
12-01-2005, 10:38 PM
<body style="background:#FFFFFF;margin-left=0cm">

Using inline styles pretty much stops CSS being as useful as it should be. As Graft-Creative suggested, placing the CSS in an external file would be much more beneficial.

ajthornton
12-02-2005, 05:45 AM
Thanks, that helps a lot



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum