valid html question
Moderator: General Moderators
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
valid html question
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)
whenever i use topmargin, leftmargin, marginheight -- the w3 validator says they arent valid attributes
(otherwise i'd have a totally valid layout)
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact:
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.
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.
Last edited by mydimension on Mon Jun 03, 2002 8:27 am, edited 1 time in total.
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
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?
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
If you're trying to set the margin's for a page try adding in a CSS declaration of:
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:
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
Code: Select all
BODY { margin: 0; }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; }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
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact: