Page 1 of 1

valid html question

Posted: Sat Jun 01, 2002 12:37 pm
by hob_goblin
how do i set the margins on a page and it still be valid?

whenever i use topmargin, leftmargin, marginheight -- the w3 validator says they arent valid attributes

(otherwise i'd have a totally valid layout)

Posted: Sat Jun 01, 2002 12:50 pm
by fatal
There might be a new way of doing that now.

Posted: Sat Jun 01, 2002 1:32 pm
by volka
try
style="border:1px 2px 3px 4px"

Posted: Sun Jun 02, 2002 9:22 pm
by hob_goblin
lol, using css defeats the purpose i would think, since IE is the only browser with good css support :-/

Posted: Sun Jun 02, 2002 10:31 pm
by mydimension
bzzz, wrong!

NN/Mozilla is the only browser with proper CSS support. and besides pretty much all browsers support the border style. you should consider using CSS more often anyway cause XHTML is making attributes more and more obsolete.

Posted: Mon Jun 03, 2002 6:28 am
by MattF
Opera also supports CSS very well.

Posted: Mon Jun 03, 2002 3:44 pm
by hob_goblin
if any of you would like checking out http://www.ice-on-fire.net/~team - in opera or netscape and telling me how it looks, and if you view the source the css is all there... if it looks bad, do you know what i'm doing wrong?

Posted: Mon Jun 03, 2002 4:17 pm
by twigletmac
If you're trying to set the margin's for a page try adding in a CSS declaration of:

Code: Select all

BODY { margin: 0; }
that'll remove the border from around the page.
If you want to set the margin's to be different, top, bottom, left and right try:

Code: Select all

BODY { margin: 10px 5px 15px 7px; }
The sizes are obviously not what you'd probably want but they go in the order - top -> right -> bottom -> left (like a clock 12 - 3 - 6 - 9).

This works in IE 5.x and up and Netscape 6.x, IIRC Netscape 4.7 just ignores it. Should be fine in Opera too.

Mac

Posted: Mon Jun 03, 2002 11:56 pm
by hob_goblin