HTML Help

liunx

Guest
Hello - I am an HTML beginner and need help with something I hope is simple. In the attached file, you can see that there is a big space between the graphic on top (portrait page3.gif) and the start of the top of the table containing images below it. I can't seem to get rid of this space no matter what I try. The space is not there when I view the page in Dreamweaver but when I view it in Explorer, it is there. Can anyone help?<br />
<br />
Thanks.<!--content-->In the attached file, you can see that there is a big space between the graphic on top (portrait page3.gif) and the start of the top of the table containing images below it. <br />
<br />
Since you do not link to the images there is obviously no way for us to see this. An URL to the page would have been much better.<br />
<br />
Though I can already now tell that you are missing important parts on your webpage that will make it not pass validation, eg the DOCTYPE<br />
<br />
Start with adding eg this at the very top of your webpage (before <html>)<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><br />
<br />
or if you are trying to make your page work with NS 3 or even older browsers<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><br />
<br />
and then check your page at<br />
<!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m --><!--content-->Stefan -<br />
<br />
Here is the URL to my site:<br />
<br />
<!-- w --><a class="postlink" href="http://www.davidsilpa.com">www.davidsilpa.com</a><!-- w --><br />
<br />
Can you see something obvious that would cause the big space I described?<br />
<br />
I will try the validator that you suggested but I'm afraid what it will find!! :) <br />
<br />
Thanks for your post.<!--content-->Try this <br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><br />
<html><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<meta http-equiv="Content-Script-Type" content="text/javascript"><br />
<meta http-equiv="Content-Style-Type" content="text/css"><br />
<title>David's Photo Site</title><br />
<style title="Default" media="screen" type="text/css"><br />
<br />
body {background:url(images/yellow_stucco.gif); color:blue; font:100% arial, verdana, courier, sans-serif; text-align:center;}<br />
h1 {font-size:110%;}<br />
table {margin:0 auto;}<br />
<br />
</style><br />
</head><br />
<body><br />
<br />
<h1>David's Main Photo Page</h1><br />
<hr><br />
<p>Click the images to see that<br>collection of photos</p><br />
<br />
<br />
<table><br />
<tr><br />
<td align="center"> <a href=http://www.webdeveloper.com/forum/archive/index.php/"morocco.htm"><img alt="" src="images/camel.jpg" width="150"></a><br><i>Morocco</i></td><br />
<td align="center"> <a href=http://www.webdeveloper.com/forum/archive/index.php/"paris.htm"><img alt="" src="images/eiffel tower closeup.jpg" width="150"></a><br><i>Paris</i></td><br />
<td align="center"> <a href=http://www.webdeveloper.com/forum/archive/index.php/"children.htm"><img alt="" src="images/child with cotton candy.jpg" width="150"></a><br><i>Children</i></td><br />
<td align="center"> <a href=http://www.webdeveloper.com/forum/archive/index.php/"portraits.htm"><img alt="" src="images/hadas sexy.jpg" width="150"></a><br><i>Portraits</i></td><br />
<td align="center"> <a href=http://www.webdeveloper.com/forum/archive/index.php/"lovers.htm"><img alt="" src="images/lovers in luxembourg1.jpg" width="150"></a><br><i>Lovers</i></td><br />
</tr><br />
<tr><br />
<td align="center"> <a href=http://www.webdeveloper.com/forum/archive/index.php/"color.htm"><img alt="" src="images/kids festival.jpg" width="150"></a><br><i>Color</i></td><br />
<td align="center"> <a href=http://www.webdeveloper.com/forum/archive/index.php/"corsica.htm"><img alt="" src="images/the gorgeous gorge.jpg" width="150"></a><br><i>Corsica</i></td><br />
</tr><br />
</table><br />
<br />
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"mailto:[email protected]">[email protected] </a></p><br />
<p>David Silpa<sup>&copy</sup></p><br />
</body><br />
</html><br />
<br />
<br />
BTW, you should specify an alt-text that describes the images for when people cannot see them (for technical or disability reasons).<!--content-->Hi Dsilpa,<br />
<br />
I know you probably won't need this now that Stefan has given you some nice code to do the job properly, but the reason you had a space between your text and the top of the table was because you have 2 line breaks in the wrong place i.e. in the middle of your table rows. <br />
<tr><br />
</tr><br />
<br><br><br />
<tr><br />
</tr><br />
<br />
The breaks will have no effect upon the table unless they are in between the correct td tags, but they have affected the space around the table.<br />
<br />
Paul<!--content-->Stephan & Paul -<br />
<br />
Thank you both for your reply. It was a big help.<br />
<br />
David<!--content-->
 
Back
Top