Saturday, March 24, 2012

margint hat I dont want

Hi,
I organized my website with a HTML Table. Inside the cells, I put the ASP.NET controls. I set the height and width of the Table which holds all controls to 100%. But, when I open it in my browser (IE 6.0), then there is a small white margin around my table (top: 45px, left: 26px, bottom: 23 px, rigth 10 px). What should I do to fit my table into the site?

Thanks, Rainer.

P.S.: I set border to 0px, margin to 0px, padding to 0px, cellspacing to 0px and cellpadding to 0px.Did you set the margins of the document means body to 0px, too?
Like this:

<%@. Page Language="VB" %>
<script runat="server">
' your code
</script>
<style type="text/css" media="all">
body
{
padding: 0;
margin: 0;
}
</style>
<html>
<head>
</head>
<body>
<form runat="server">
<table bgcolor="#cccccc" border="0" cellpadding="20" cellspacing="0" width="100%">
<tr>
<td>This table should be as wide as the browser window.</td>
</tr>
<tr>
<td>And without out margins.</td>
</tr>
</table>
</form>
</body>
</html>

0 comments:

Post a Comment