Jump to content

Tables And The Extra Space


Imoddedu
 Share

Recommended Posts

Here is the website-The WebsiteHere is the source code-

<html><head><title>Suite4Gamers | Home </title>	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">	<meta name="keywords" content="Coding, Free, Website, Programming, Gaming, Free Gaming, Gaming Community, Mapping, Game Mapping, Game Programming, Forums, Game Forums, Gaming Forums, Free Gaming Forums, Steam, Source, Source SDK, Source SDK Tutorials">	<meta name="description" content="Suite4Gamers, a gaming discussion and development website">	<meta name="robots" content="all">	<link rel="stylesheet" type="text/css" href="style1.css" /></head><body><div align="center" width="900" id="container">	<div align="center" width="730" height="200" id="header">	<img width="728" height="100" src="/Images/HeaderPic.png" />	<br />	<div width="728" height="90">	<table width="728" height="90" cellspacing="0" cellpadding="0">	</table>	<br />	<!-- Google Ads -->	</div>	</div>	<!-- Buttons -->	<table width="730" height="60" align="center" cellpadding="0" cellspacing="0">	<tr width="730" height="60" align="center">	<td width="145" height="60" class="button" align="center">		<span class="buttonspan"><a class="button" href="index.php"><b><i>Home</i></b></a></span>	</td>	<td width="145" height="60" class="button" align="center">	<span class="buttonspan"><a href="/about/index.php"><b><i>About</i></b></a></span>	</td>	<td width="145" height="60" class="button" align="center">	<span class="buttonspan"><a href="/support/index.php"><b><i>Support</i></b></a></span>	</td>	<td width="145" height="60" class="button" align="center">	<span class="buttonspan"><a href="/forums/index.php"><b><i>Forums</i></b></a></span>	</td>	<td width="145" height="60" class="button" align="center">	<span class="buttonspan"><a href="/downloads/index.php"><b><i>Downloads</i></b></a></span>	</td>	</tr>	</table>		<br />	<br />	<table width="730" height="600" align="center" cellpadding="0.1" cellspacing="0">	<tr width="730" height="600" align="center">	<td width="568" height="600" align="left" class="news">	<p class="text"><b>   Welcome to Suite4Gamers, a site dedicated to the discussion and development of games. Here you can download user made maps, mods, applications, and even sign up to discuss with others and get updates. Registering is free and fast! What do you have to loose? Join up today!</b></p>	<br />	<p class="newstext"><b><i>   News:</i></b></p>	<br />	<p class="text"><b><i>   05/1/09 --</i></b>	<br />	  Suite4Gamers is now open! We encourage you to register and help us get the site popular!</p>	</td>	<td width="160" height="600" align="center">	</td>	</tr>	</table></body></html>

There is a big space in between the top of the table that has the gray gradient background and the text in it. Why is that?

Link to comment
Share on other sites

There is a big space in between the top of the table that has the gray gradient background and the text in it. Why is that?
It's because the td has a specified height of 600 pixels and the text inside takes up less space than 600 pixels and td elements, by default, vertically align their contents in the center. You can change this line:
<td width="568" height="600" align="left" class="news">

To:

<td width="568" height="600" align="left" class="news" valign="top">

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...