Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 24, 2008, 11:48:31 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Table data height  (Read 190 times)
tomrichey
Spacescooter Operator
*****
Offline Offline

Posts: 42


WWW
« on: January 14, 2008, 01:45:19 PM »

Hello everyone-

I am attempting to draw a fraction using the following code inside the table data cell of another table:

<table cellpadding="0" cellspacing="0">
 <tr> <td align="center"><div class="FontSize2"><b>24</b></div></td> </tr>

 <tr> <td align="center"><img src="<?php echo $LinePath; ?>" alt="Fraction bar" height="2" width="<?php echo $Frac2ChWid; ?>"></td> </tr>

 <tr> <td align="center"><div class="FontSize2"><b>30</b></div></td> </tr>
</table>

"FontSize2" is just a text size, $LinePath is the path to the image of the fraction bar, and $Frac2ChWid stores the width of the fraction bar in different screen resolutions.  In IE6 the fraction shows up fine, but in Firefox the table data cell containing the image of the fraction bar is always about 20 pixels high instead of 2. I have tried the following CSS statements combined with <td class="test"> to fix the problem:

td.test
 { margin: 0px;
    height: 3px;
    padding: 0px; }

td.test
 { display: block;
    margin: 0px;
    height: 3px;
    padding: 0px; }

The first statement has no effect, the second produces a strange image that looks like a completely new table cell has been created in addition to the existing one.

What am I doing wrong?  I am a novice programmer, so please use simple terminology.

Thanks for your help,
Tom Richey
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM