Wednesday, February 08, 2006

HTML: Remove Margins from web pages

Sometimes making a webpage can be frusterating. You make a table with width and height of 100% for positioning and it still doesn't fill up the whole webpage why? Margins.

Don't forget to set margins in your body tag.

<html>
<
head>
<
title>webpage title</title>
<
/head>

<
body bgcolor="#ffffff" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<
/body>
<
/html>


with CSS:
<style type="text/css">
body
{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
</style>