Welcome to WebmasterWorld Guest from 54.147.250.33

Forum Moderators: incrediBILL

Moving a table to the very top of the page

table at top of page

   
10:21 am on Jun 15, 2010 (gmt 0)



First I am a designer and very noobish at development. So thank you for your patience.

I am using Dreamweaver and having a problem with a space above the table at the top of the page.

I think the problem in the code is in this section:

</title>
<style type="text/css">
<!--
body,td,th {
font-family: Times New Roman, Times, serif;
}
body<div align="center">
{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
body {

background-image: url(18original.jpg);
}
-->
</style></head>

<body>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="4">&nbsp;</td>


Thank you for any help you can give me!
10:50 am on Jun 15, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is a bit of code from one of my sites :

<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" BGCOLOR="#FFFFFF">

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#FFFFFF" WIDTH="760" VSPACE="0" HSPACE="0">
11:03 am on Jun 15, 2010 (gmt 0)

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



body<div align="center">
{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
body {

background-image: url(18original.jpg);
}


you need to remove this: <div align="center">

OT, you could also tidy up the css code like this:
body
{
margin:0;background-image: url(18original.jpg);
}
11:10 am on Jun 15, 2010 (gmt 0)



Thank you so much for your responses and help!

I have tried without the center tag and the table is not centered on the page, is there some other place I should have that tag placed to have the table centered that won't create a space at the top?
11:21 am on Jun 15, 2010 (gmt 0)

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



which center tag did you remove?
7:34 pm on Jun 15, 2010 (gmt 0)

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



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
html,body {margin:0px; padding:0px}
</style>
</head>

<body>

<table width="90%" border="1" style="margin:0px 5%">
<tr><td>Mary had </td><td>a little</td><td>lamb</td></tr>
</table>

<div style="padding:0px 32px">
<table width="100%" border="1">
<tr><td>Mary had </td><td>a little</td><td>lamb</td></tr>
</table>
</div>

</body>
</html>
11:32 am on Jun 16, 2010 (gmt 0)



topr8...thanks it was your help that fixed it. I removed that exact tag and it worked without the page losing its centered-ness (word?)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month