PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Dec 18, 2018 7:14 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: valid html question
PostPosted: Sat Jun 01, 2002 12:37 pm 
Offline
Forum Regular
User avatar

Joined: Sun Apr 28, 2002 9:53 pm
Posts: 978
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)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 01, 2002 12:50 pm 
Offline
Forum Contributor
User avatar

Joined: Sat Apr 20, 2002 10:47 am
Posts: 118
Location: East Coast
There might be a new way of doing that now.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 01, 2002 1:32 pm 
Offline
DevNet Evangelist
User avatar

Joined: Tue May 07, 2002 9:48 am
Posts: 8391
Location: Berlin, ger
try
style="border:1px 2px 3px 4px"


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 02, 2002 9:22 pm 
Offline
Forum Regular
User avatar

Joined: Sun Apr 28, 2002 9:53 pm
Posts: 978
lol, using css defeats the purpose i would think, since IE is the only browser with good css support :-/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 02, 2002 10:31 pm 
Offline
Moderator
User avatar

Joined: Tue Apr 23, 2002 6:00 pm
Posts: 531
Location: Lowell, MA USA
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.


Last edited by mydimension on Mon Jun 03, 2002 8:27 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 03, 2002 6:28 am 
Offline
Forum Contributor

Joined: Sun May 19, 2002 9:58 am
Posts: 225
Location: Sussex, UK
Opera also supports CSS very well.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 03, 2002 3:44 pm 
Offline
Forum Regular
User avatar

Joined: Sun Apr 28, 2002 9:53 pm
Posts: 978
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 03, 2002 4:17 pm 
Offline
Her Royal Site Adminness
User avatar

Joined: Tue Apr 23, 2002 2:21 am
Posts: 5371
Location: Essex, UK
If you're trying to set the margin's for a page try adding in a CSS declaration of:
Syntax: [ Download ] [ Hide ]
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:
Syntax: [ Download ] [ Hide ]
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 03, 2002 11:56 pm 
Offline
Forum Regular
User avatar

Joined: Sun Apr 28, 2002 9:53 pm
Posts: 978
http://validator.w3.org/check?uri=http% ... tline=&sp=


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group