Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

top bloody margin won't GO AWAY...! 2

Status
Not open for further replies.

DiamondLil

Technical User
Jul 16, 2002
107
0
0
US
ok, stupid issue that is taking FAR FAR too much time. I absolutely cannot get rid of the top margin of this page. I need to have it flush against the top and leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" just aren't cutting it.

I thought page wasn't getting on with css & javascript in the header so I took it out. when that didn't work I put it back (besides I need it to work with both in the head anyway...)

anyone have a clue as to what's going on ???
I put a border around the table to make it more obvious.
link:
 
Try adding:

body{
margin:0;
}

to the stylesheet.

Rick
 
Hey Rick - thanks. I tried it, didn't do the trick though.
 
not sure if this would be affecting it or not- but it is generally not a good idea to mix fixed and % sizing- like having one row sized 50% and then the next 80 (pixels)...
 
you have a <br> in between two cells-

search for
</td>
<br>
<td id=&quot;bottom_sitemap&quot;
 
i know, you're right. but I couldn't get away from it with this layout.
 
you have a <br> in between two cells-

search for
</td>
<br>
<td id=&quot;bottom_sitemap&quot;
 
Diamond Lil, you have a typo in mainstyles.css in the line for tr#lil_block_row (you have border-bootom instead of border-bottom).

I'm still trying to fix the original problem as I don't think that was causing it. Joe Bananas' guide to Perth, Scotland
Bananas' tribute to Fawlty Towers!
 
I think I've fixed it, do you have an e-mail I can send the new CSS and HTML files to? I've kept the CSS filename the same but named the HTML file fixedfile.htm, so you'll need to rename it to whatever the original file was called.

I suggest you keep a back-up copy of the old files in case you want to revert back but I have fixed several typos and other errors in the original. Joe Bananas' guide to Perth, Scotland
Bananas' tribute to Fawlty Towers!
 
Here's the new CSS, you might notice I've doubled up some of them: you can do that if the rule is identical.

body {
margin: 0;
background-color: #1b646c;
}
td#t1_1, td#t4_1, td#t6_1 { border-right: 2px solid #399797; }
td#t1_3 { border-right: 2px solid #399797; border-left: 2px solid #399797; }
td#t2_1, td#t2_4 { border-top: 2px solid #399797; }
td#t2_3 { vertical-align: top; border-top: 2px solid #399797; border-right: 2px solid #399797; }
td#t2_5, td#t2_7, td#t2_9 { border: solid 2px #399797; }
td#t3_1 { background-color: #399797; border-right: 2px solid #399797; border-bottom: 2px solid #399797; }
td#t5_1 { border-right: 2px solid #399797; border-bottom: 2px solid #399797; }
td#t5_3 { border-bottom: 2px solid #399797; border-left: 2px solid #399797; }
td#rightofmain, td#lgrightofmain { border-left: 2px solid #399797; }
tr#lil_block_row { border-top: 2px solid #399797; border-bottom: 2px solid #399797; }
td#holdslogo { border-top: 2px solid #399797; border-bottom: 2px solid #399797; }
td#holdssignup { color: #78c6c4; font: bold 13px Arial, Verdana, sans-serif; text-align: right; border-top: 2px solid #399797; border-bottom: 2px solid #399797; }
td#holdssearch { border-right: 2px solid #399797; border-bottom: 2px solid #399797; }
td#holdswhatshot { border-bottom: 2px solid #399797; }
td#toplinks { text-align: center; border-bottom: 2px solid #399797; }
td#toplinks a { color: #003366; text-decoration: none; padding-top: 3px; padding-bottom: 2px; width: 100; }
td#toplinks a, td#mainlinks h4 { color: #ffffff; font: 80% Arial, Verdana, sans-serif; }
td#toplinks a:hover { color: white; text-decoration: underline; }
.signupbox { font-size: 12px; }
.signupbutton, .searchbutton { color: #ffffff; font-size: 11px; background-color: #399797; }
.searchbox { color: #ffffff; font-size: 12px; background-color: #399797; }
td#sidenav { color: #78c6c4; font: bold 80% Arial, Helvetica, Geneva, Swiss, SunSans-Regular; text-align: left; padding-top: 2; border-right: 2px solid #399797; padding-top: 5px; }
td#center { background-color: #1b646c; }
td#maincontent { border-bottom: 2px solid #399797; }
td#farright { color: #1b646c; font-size: 14px; text-align: left; padding: 4px; border-right: 2px solid #399797; border-left: 2px solid #399797; }
h6 { color: #1b646c; font: bold 14px; text-align: left; border-right: 2px solid #399797; }
td#bottomlinks { color: #399797; text-align: center; border-right: 2px solid #399797; }
td#bottomlinks a { color: #399797; text-decoration: none; padding-top: 3px; padding-bottom: 2px; width: 110px; }
td#bottomlinks a { font: bold 80% Arial, Verdana, sans-serif; }
td#bottomlinks a:hover { color: white; text-decoration: underline; }
td#bottom_sitemap { color: #399797; text-align: center; }
td#bottom_sitemap a { color: #399797; font: bold 80% Arial, Verdana, sans-serif; text-decoration: none; padding-top: 3px; padding-bottom: 2px; width: 110px; }
td#bottom_sitemap a:hover { color: white; text-decoration: underline; }
td#footer_address { color: #399797; font-size: 13px; text-align: center; border-right: 2px solid #399797; }
td#footer_phone { color: #399797; font-size: 13px; text-align: center; } Joe Bananas' guide to Perth, Scotland
Bananas' tribute to Fawlty Towers!
 
Here is the HTML, there was an extra </tr> which was the root of the problem.

<!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
<head>
<meta http-equiv=&quot;content-type&quot; content=&quot;text/html;charset=ISO-8859-1&quot;>
<title>MC2 Advertising</title>
<link href=&quot;mainstyles.css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot;>
<style type=&quot;text/css&quot;>
.signupbox { color: #78C6C4; font-size: 12px; background-color: #1B646C; }
.signupbutton { color: #FFFFFF; font-size: 11px; background-color: #399797; }
</style>
<script language=&quot;javascript&quot;>
function surfto(form)
{
var whereto=form.jump.selectedIndex
if (form.jump.options[whereto].value != 0)
{
location=form.jump.options[whereto].value;
}
}
</script>
</head>

<body>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; align=&quot;center&quot;>
<tr><td id=&quot;t1_1&quot; width=&quot;50%&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t1_2&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t1_3&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t1_4&quot; colspan=&quot;2&quot; width=&quot;800&quot;><img src=&quot;images/transpixel.gif&quot; alt=&quot;&quot; height=&quot;100%&quot; width=&quot;2&quot; border=&quot;0&quot;></td>
<td id=&quot;t1_5&quot; colspan=&quot;5&quot;><font color=&quot;#1b646c&quot;>x</font></td>
</tr>
<tr>
<td id=&quot;t2_1&quot; width=&quot;50%&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t2_2&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t2_3&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;maincontent&quot; rowspan=&quot;4&quot; colspan=&quot;2&quot; width=&quot;800&quot; height=&quot;509&quot;>
<table width=&quot;800&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; height=&quot;500&quot;>
<tr height=&quot;80&quot; >
<td id=&quot;holdslogo&quot; bgcolor=&quot;#399797&quot; width=&quot;165&quot; height=&quot;80&quot; ><img src=&quot;images/mc2adv_logo.gif&quot; alt=&quot;Mc2 Logo&quot; height=&quot;80&quot; width=&quot;165&quot; border=&quot;0&quot;></td>
<td id=&quot;holdssignup&quot;colspan=&quot;2&quot; align=&quot;right&quot; bgcolor=&quot;#399797&quot; height=&quot;80&quot;>
<form name=&quot;ccoptin&quot; action=&quot; target=&quot;_blank&quot; method=get>
newsletter signup <font size=&quot;2&quot; face=&quot;Verdana,Arial,Helvetica&quot;><input type=hidden name=&quot;activepage&quot; value=&quot;sdredirect&quot;>
<input class=&quot;signupbox&quot; type=text name=&quot;ea&quot; value=&quot;enter email&quot; size=25>
<input type=hidden name=&quot;m&quot; value=&quot;9wxk5rn6&quot;>
<input type=hidden name=&quot;p&quot; value=&quot;oi&quot;>
<input class=&quot;signupbox&quot; type=submit name=&quot;go&quot; value=&quot;go&quot;>
</font></form>
</td>
</tr>
<tr height=&quot;38&quot;>
<td id=&quot;holdssearch&quot; bgcolor=&quot;#1b646c&quot; width=&quot;165&quot; height=&quot;38&quot;>
<form method=&quot;get&quot; action=&quot; <input class=&quot;searchbox&quot; value=&quot; search the site&quot; size=&quot;18&quot; name=&quot;sp-q&quot; type=&quot;text&quot;> <input class=&quot;searchbutton&quot; type=&quot;submit&quot; value=&quot;go&quot;><input type=&quot;hidden&quot; name=&quot;sp-a&quot; value=&quot;000a0826-sp00000002&quot;>
</form>
</td>
<td id=&quot;toplinks&quot; bgcolor=&quot;#1b646c&quot; height=&quot;38&quot;><a href=&quot;../../../../../Desktop%20Folder/proj05/review.html&quot; class=&quot;aboutmc2&quot;>ABOUT MC2</a>
<a href=&quot;../../../../../Desktop%20Folder/proj05/contact.html&quot; class=&quot;pressroom&quot;>PRESS ROOM</a>
<a href=&quot;../../../../../Desktop%20Folder/proj05/sitemap.html&quot; class=&quot;contact&quot;>CONTACT</a></td>
<td id=&quot;holdswhatshot&quot; bgcolor=&quot;#470d74&quot; width=&quot;230&quot; height=&quot;38&quot;><input type=&quot;image&quot; src=&quot;images/whatshot.gif&quot; alt=&quot;&quot; border=&quot;0&quot; height=&quot;38&quot; width=&quot;230&quot;></td>
</tr>
<tr height=&quot;382&quot;>
<td id=&quot;sidenav&quot; valign=&quot;top&quot; bgcolor=&quot;#4b0082&quot; width=&quot;165&quot; height=&quot;382&quot;>PERSONALIZE YOUR MC2 EXPERIENCE

<form name=form1>
<select style=&quot;background-color: #78C6C4;color: #1B646C;font-family: verdana,verdana,verdana; font-size: 11px;font-weight: 700;border: inset 2px #B380DA; padding: 2;&quot; name=jump onchange=surfto(this.form)>
<option value=0 selected>Browse | Industry

<option value=
<option value=
<option value= Marketing

<option value= Media

</select>
</form>
<form name=form2>
<select style=&quot;background-color: #78C6C4; color: #1B646C; font-family: verdana; font-size: 11px; font-weight: 700; border: inset 2px #B380DA; padding: 2;&quot; name=jump onchange=surfto(this.form)>
<option value=0 selected>Browse | Solution

<option value=
<option value=
<option value= Marketing

<option value= Media

</select>
</form>
</td>
<td id=&quot;center&quot; height=&quot;382&quot; ></td>
<td id=&quot;farright&quot; valign=&quot;top&quot; bgcolor=&quot;#399797&quot; width=&quot;230&quot; height=&quot;382&quot;><h6>Content title</h6>
<p></p>
<p>contentstuff here</p>
</td>
</tr>
</table>
</td>
<td id=&quot;t2_5&quot; valign=&quot;top&quot; width=&quot;24%&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t2_6&quot; valign=&quot;top&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t2_7&quot; valign=&quot;top&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t2_8&quot; valign=&quot;top&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;t2_9&quot; valign=&quot;top&quot; height=&quot;80&quot;><font color=&quot;#1b646c&quot;>x</font></td>
</tr>
<tr height=&quot;38&quot;>
<td id=&quot;t3_1&quot;colspan=&quot;3&quot; height=&quot;38&quot;><font color=&quot;#399797&quot;>x</font></td>
<td id=&quot;rightofmain&quot; colspan=&quot;5&quot; valign=&quot;top&quot; height=&quot;38&quot;><font color=&quot;#1b646c&quot;>x</font></td>
</tr>
<tr height=&quot;371&quot;>
<td id=&quot;t4_1&quot;colspan=&quot;3&quot; height=&quot;371&quot;><font color=&quot;#1b646c&quot;>x</font></td>
<td id=&quot;lgrightofmain&quot; colspan=&quot;5&quot; height=&quot;371&quot;><font color=&quot;#1b646c&quot;>x</font></td>
</tr>
<tr id=&quot;lil_block_row&quot; height=&quot;11&quot;>
<td id=&quot;t5_1&quot;colspan=&quot;3&quot; align=&quot;right&quot; height=&quot;11&quot;><img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;></td>
<td id=&quot;t5_3&quot;colspan=&quot;5&quot; height=&quot;11&quot;><img src=&quot;images/transpixel.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;3&quot; border=&quot;0&quot;><img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/md_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;> <img src=&quot;images/lt_teal.gif&quot; alt=&quot;&quot; height=&quot;9&quot; width=&quot;9&quot; border=&quot;0&quot;></td>
</tr>

<tr>
<td id=&quot;t6_1&quot; rowspan=&quot;2&quot;colspan=&quot;3&quot; align=&quot;right&quot; valign=&quot;bottom&quot;><font color=&quot;#1b646c&quot;>x</font><img src=&quot;images/transpixel.gif&quot; alt=&quot;&quot; height=&quot;100%&quot; width=&quot;1&quot; border=&quot;0&quot;></td>
<td id=&quot;bottomlinks&quot; valign=&quot;top&quot; width=&quot;570&quot; height=&quot;50%&quot;><a href=&quot;contactus.html&quot; class=&quot;question&quot;>got a question?</a> <a href=&quot;contactus.html&quot; class=&quot;question&quot;>client login</a> <a href=&quot;contactus.html&quot; class=&quot;question&quot;>send to a colleague</a></td>
<td id=&quot;bottom_sitemap&quot; align=&quot;right&quot; valign=&quot;top&quot; width=&quot;230&quot; height=&quot;50%&quot;><a href=&quot;sitemap.html&quot; class=&quot;question&quot;>site map</a></td>
<td rowspan=&quot;2&quot; colspan=&quot;5&quot; valign=&quot;bottom&quot;><font color=&quot;#1b646c&quot;>x</font></td>
</tr>
<tr height=&quot;25%&quot;>
<td id=&quot;footer_address&quot; valign=&quot;bottom&quot; width=&quot;570&quot; height=&quot;25%&quot;>
MC2 ADVERTISING, INC | 2170 WASHINGTON ROAD | CANONSBURG, PA 15317 <br>
<br>
</td>
<td id=&quot;footer_phone&quot; valign=&quot;bottom&quot; width=&quot;230&quot; height=&quot;25%&quot;>724.873.2700 | FAX 724.873.2711 <br>
<br>
</td>
</tr>
<tr height=&quot;25%&quot;>
<td id=&quot;t6_1&quot; align=&quot;right&quot; valign=&quot;bottom&quot; width=&quot;50%&quot;></td>
<td id=&quot;t6_1&quot; align=&quot;right&quot; valign=&quot;bottom&quot;></td>
<td id=&quot;t6_1&quot; align=&quot;right&quot; valign=&quot;bottom&quot;></td>
<td id=&quot;footer_address&quot; valign=&quot;bottom&quot; width=&quot;570&quot; height=&quot;25%&quot;></td>
<td id=&quot;footer_phone&quot; valign=&quot;bottom&quot; width=&quot;230&quot; height=&quot;25%&quot;></td>
<td valign=&quot;bottom&quot;></td>
<td valign=&quot;bottom&quot;></td>
<td valign=&quot;bottom&quot;></td>
<td valign=&quot;bottom&quot;></td>
<td valign=&quot;bottom&quot;></td>
</tr>
</table>
</body>
</html> Joe Bananas' guide to Perth, Scotland
Bananas' tribute to Fawlty Towers!
 
actually the extra </tr> has no effect in causing the table to be pushed down from the top of the browser... the only thing that needed to be done to put the table in its proper position was to remove the <br> that was between two cells

</td>
<br>
<td>
 
wow - guys! I just got in (day off yesterday). Let me go through all these posts and copy over the html & the css stuff. Thanks! I'll be back 'atcha!
Lil
 
Absolutely BRILLIANT!
Thanks & stars to you both for the help, the time, and the attention to detail.

..now I have to go check out Bananas' tribute to Fawlty Towers - I used to love that show...

Lil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top