Beeronius Posted May 26, 2005 Posted May 26, 2005 (edited) I've been trying forever (well, over five months) to figure out exactly why this is happening, to no avail. http://www.sjbmx.com If you click that link, you'll notice at the top of the page, the header image is off the side and top edges by one pixel. I want that space to disappear. Here's the relevant CSS for the entire site: >/* Body */ body{background:#000000;font:10px Verdana;color:#000000;margin:0px;padding:0px;border:0px} /* Tables */ table,td,tr{background:#D8E5E9;font:10px Verdana;color:#000000;margin:0px;cellpadding:0px;border:0px} And here's the HTML for the header: ><html> <head> <title>sjbmx.com</title> <link rel="stylesheet" href="sjbmx.css" type="text/css"/> <script LANGUAGE="JavaScript"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function CaricaFoto(img){ foto1= new Image(); foto1.src=(img); Controlla(img); } function Controlla(img){ if((foto1.width!=0)&&(foto1.height!=0)){ viewFoto(img); } else{ funzione="Controlla('"+img+"')"; intervallo=setTimeout(funzione,20); } } function viewFoto(img){ largh=foto1.width+20; altez=foto1.height+20; stringa="width="+largh+",height="+altez; finestra=window.open(img,"",stringa); } // End --> </script> </head> <body> <center> <table align="center" width="800" height="100%"> <tr> <td align="left" valign="top"> <!-- ImageReady Slices (header.psd) --> <table id="Table_01" width="800" height="100" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="9"> <img src="images/header_01.gif" width="800" height="70" alt=""></td> </tr> <tr> <td> <img src="images/header_02.gif" width="609" height="30" alt=""></td> <td> <a href="index.php"> <img src="images/header_news.gif" width="31" height="30" border="0" alt=""></a></td> <td> <img src="images/header_04.gif" width="19" height="30" alt=""></td> <td> <a href="riders.php"> <img src="images/header_riders.gif" width="37" height="30" border="0" alt=""></a></td> <td> <img src="images/header_06.gif" width="14" height="30" alt=""></td> <td> <a href="photos.php"> <img src="images/header_photos.gif" width="43" height="30" border="0" alt=""></a></td> <td> <img src="images/header_08.gif" width="15" height="30" alt=""></td> <td> <a href="links.php"> <img src="images/header_links.gif" width="29" height="30" border="0" alt=""></a></td> <td> <img src="images/header_10.gif" width="3" height="30" alt=""></td> </tr> </table> <!-- End ImageReady Slices --> </td> </tr> <tr> <td align="left" valign="top" height="100%"> <br><br> Any suggestions? This is really annoying to me, although almost no one else ever seems to notice it. Edited May 26, 2005 by Beeronius Quote
abinidi Posted May 26, 2005 Posted May 26, 2005 I know you are using CSS, and I don't know enough about CSS to give you much help, but in HTML (not XHTML), you can add MARGINWIDTH and MARGINHEIGHT attributes to the body tag to take away the padding that is preset on an HTML page. More information about these tags is avaialble online. One place is below, but you could google more... http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/body.html I'm sure a CSS guru will come along soon and give you some better CSS advice. Quote
TweezerMan Posted May 26, 2005 Posted May 26, 2005 I messed with the code in FrontPage and tested it both in IE and Firefox. I believe the problem is with the first table tag after the <body> tag: ><table align="center" width="800" height="100%"> Adding cellpadding="0" cellspacing="0" to the tag seemed to fix the problem: ><table align="center" width="800" height="100%" cellpadding="0" cellspacing="0"> Quote
Beeronius Posted May 26, 2005 Author Posted May 26, 2005 I messed with the code in FrontPage and tested it both in IE and Firefox. I believe the problem is with the first table tag after the <body> tag: ><table align="center" width="800" height="100%"> Adding cellpadding="0" cellspacing="0" to the tag seemed to fix the problem: ><table align="center" width="800" height="100%" cellpadding="0" cellspacing="0"> <{POST_SNAPBACK}> Gah! I feel so stupid now. *punches self in face* Thanks a lot, David. Quote
TCH-Don Posted May 26, 2005 Posted May 26, 2005 Cellpadding and cellspacing do not work in css yet so its best to keep them in the table tag. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.