homepage Welcome to WebmasterWorld Guest from 54.166.105.24
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Moving a table to the very top of the page
table at top of page
Dandkandb




msg:4152816
 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!

 

Mark_A




msg:4152820
 10:50 am on Jun 15, 2010 (gmt 0)

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">

topr8




msg:4152824
 11:03 am on Jun 15, 2010 (gmt 0)

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);
}

Dandkandb




msg:4152826
 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?

topr8




msg:4152829
 11:21 am on Jun 15, 2010 (gmt 0)

which center tag did you remove?

kaled




msg:4153142
 7:34 pm on Jun 15, 2010 (gmt 0)

<!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>

Dandkandb




msg:4153524
 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?)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved