Table row height question

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
paultfh
Forum Commoner
Posts: 31
Joined: Thu Jul 20, 2006 6:24 pm

Table row height question

Post by paultfh »

I am having a problem shrinking my row height. I was wondering how to do it in the following code.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<style type="text/css">
body {
  	background: none;
}

pre.monotext {
	font-family: "Andale Mono", "Monotype.com", monospace;
	font-size: 12px;
}
</style>
<table cellpadding="0" cellspacing="0" width="100%">

	<tr  bgcolor='#FFFFFF' onMouseOver="this.bgColor='gold';" 
	onMouseOut="this.bgColor='#FFFFFF';">

	
	<td align=left><pre class="monotext">1</pre></td>
	<td><pre class="monotext">1041</pre></td>
	<td><pre class="monotext">example</pre></td>
	<td><pre class="monotext">ex</pre></td>
	<td align=center><pre class="monotext">ex</pre></td>
	<td align=right><pre class="monotext">ex</pre></td>

	<td align=right><pre class="monotext">ex</pre></td>
	
	</tr>

	<tr  bgcolor='#EEEEEE' onMouseOver="this.bgColor='gold';" 
	onMouseOut="this.bgColor='#EEEEEE';">
	
	<td align=left><pre class="monotext">2</pre></td>
	<td><pre class="monotext">1041</pre></td>
	<td><pre class="monotext">example</pre></td>
	<td><pre class="monotext">ex</pre></td>
	<td align=center><pre class="monotext">ex</pre></td>
	<td align=right><pre class="monotext">ex</pre></td>

	<td align=right><pre class="monotext">ex</pre></td>
	
	</tr>

	<tr  bgcolor='#FFFFFF' onMouseOver="this.bgColor='gold';" 
	onMouseOut="this.bgColor='#FFFFFF';">

	
	<td align=left><pre class="monotext">3</pre></td>
	<td><pre class="monotext">1041</pre></td>
	<td><pre class="monotext">example</pre></td>
	<td><pre class="monotext">ex</pre></td>
	<td align=center><pre class="monotext">ex</pre></td>
	<td align=right><pre class="monotext">ex</pre></td>

	<td align=right><pre class="monotext">ex</pre></td>
	
	</tr>

</table>

</body>
</html>
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Try this

Code: Select all

pre.monotext
{
  font-family: "Andale Mono", "Monotype.com", monospace;
  font-size: 12px;
  line-height: 10px;
}

td {
  line-height: 10px;
}

paultfh
Forum Commoner
Posts: 31
Joined: Thu Jul 20, 2006 6:24 pm

Post by paultfh »

Didn't work for me in either firefox or iexplorer.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Code: Select all

body {
        background: none;
}

pre {
  display: inline;
}

pre.monotext {
        font-family: "Andale Mono", "Monotype.com", monospace;
        font-size: 12px;
}

td {
  padding: 3px;
}
paultfh
Forum Commoner
Posts: 31
Joined: Thu Jul 20, 2006 6:24 pm

Post by paultfh »

Good deal, thanks much.
Post Reply