Forum Moderators: open
Here is the top of the code for my page:
</head>
<body bgcolor="#000066">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="7" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<tr valign="top">
The table BG is white, I would like it all the way to the top of the page, but there is a small row of blue background showing above the white table. I would just like the background to show on the sides of the table and not any above the table. Any help would be appreciated.
Thanks in advance,
Steve
Using an inline CSS style on your body tag:
<body bgcolor="#000066" style="margin-top:0;padding-top:0;">
Or, if you use an external stylesheet, you can set:
body {
margin-top:0;
padding-top:0;
} Tables, by default, don't have any margins, so that should sort it.
You might want to think about replacing some of your HTML attributes with CSS.
bgcolor(which is now deprecated) can be replaced with the CSS equivalent of
background-color. So, to repeat the previous example...
<body style="background-color:#000066; margin-top:0; padding-top:0;">
Or...
body {
background-color:#000066;
margin-top:0;
padding-top:0;
} ... would have the same effect.
Hope that helps.