Welcome to WebmasterWorld Guest from 54.160.198.60

Forum Moderators: incrediBILL

Message Too Old, No Replies

leftmargin=0 and topmargin=0 in XHTML?

     
4:15 pm on Oct 27, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 16, 2004
posts:61
votes: 0


in the days of HTML to get a page to "hug" the left and top edge of browser window (that is to have graphics for instance bleed right to the edge) you'd use the leftmargin="0" and topmargin="0" in the body tag

from what I understand that is no longer supported by XHTML 1.0, correct?

what do you do these days?

4:35 pm on Oct 27, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
posts:3710
votes: 0


CSS : body { margin:0px } should suffice

Kaled.

4:38 pm on Oct 27, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 16, 2004
posts:61
votes: 0


thanks
6:53 pm on Oct 27, 2005 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9068
votes: 4


To account for Opera prior to the version 9 beta which was recently released, you need to also set the padding to zero on the body element:

body {margin:0;padding:0;}

Other browsers all use the margin.