Topic: xhtml body margin (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10851" title="Pages that link to Topic: xhtml body margin (Page 1 of 1)" rel="nofollow" >Topic: xhtml body margin <span class="small">(Page 1 of 1)</span>\

 
GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 11-08-2002 12:14

just found out, that i cannot specify the topmaring="" leftmargin="" etc. attributes in xhtml.

what other possibilities do i have to make a borderside 0 length?

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 11-08-2002 13:01

In the head

code:
<style type="text/css">
html, body {
margin: 0;
padding: 0;
}
</style>


The padding is for Opera.
If you want to use say a 5 pixel margin you have to specify it like margin: 5px;

Hope that helps

FAQ
Nervous Wreck (II) Inmate

From: OzoneAsylum
Insane since: Sep 2002

posted posted 11-08-2002 17:04

And although HZR posted the important bit already, never forget that the OzoneAsylum FaqWiki has the answer to almost any question:

How do I get the contents of my webpage hard up against the side and top of the browser?

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 11-09-2002 11:09

thanks, but it doesnt really solve my problem. netscape 4 just needs those attributes. so i cant make the site xhtml compliant.


another problem:
when i use php in my xhtml document.
it thinks the <?xml at the beginning should be parsed. is there another solution than echoing that line with php?

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 11-09-2002 12:14

If it really has to work with Netscape 4 -

About the <?xml... line - It's really not needed and will only cause problems in IE6 which will use IE5's wrong box-model. Remove that line and include a character encoding with a meta tag in the head like this:

code:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

or whatever encoding you want to use.



[This message has been edited by HZR (edited 11-09-2002).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 11-09-2002 14:50

GRUMBLE: I use a HERE document:
http://faq.ozoneasylum.com/798/

to store the <?xml tag - it isn't needed everywhere but can cause trouble in some situations.



___________________
Emps

FAQs: Emperor



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu