Jump to content

set bottom border to 1px of <TD> only


jasonc

Recommended Posts

i have tried the following but this did not work

 

<tr style="border-bottom: 1px;">

 

my full code...

 

what should i add to make the bottom border of the last <td> to 1px in height.

 

<table width="970">
    <tr>
      <td width="120"><div align="center">header1</div></td>
  <td width="167">header2</td>
  <td width="556">header3</td>
  <td width="107"><div align="center">header4</div></td>
</tr>
<? for ($i = 0; $i < $numberofrows; $i++) {
$h1 = mysql_result($data, $i, "h1");
$h2 = mysql_result($data, $i, "h2");
$h3 = mysql_result($data, $i, "h3");
$h4 = mysql_result($data, $i, "h4");
?>
<tr>
	<td align="left" valign="top"><div align="center"><?=$h1;?></div></td>
	<td align="left" valign="top"><?=$h2);?></td>
	<td align="left" valign="top"><?=$h3;?></td>
	<td valign="top"><div align="center"><?=$h4;?></div></td>
</tr>
<? } ?>
</table>

Link to comment
Share on other sites

yep i tried that too, both did not work, IE or FireFox

 

ok

 

i just tried something else and got it working in FireFox

 

border-collapse:collapse; in the table style

 

but it does not work in IE

 

is there a fix to get it to work in IE ?

 

 

Link to comment
Share on other sites

please try the code i gave in my first post as this is what code i used to test

 

hopefully there is a way to have this show in both IE and FireFox

 

It does show ok in FireFox tho, but really would be good to have showing in IE too

 

thanks for your help

Link to comment
Share on other sites

i did place it in the td itself...

 

it works !  only in FireFox tho

 

not in Internet Explorer

 

here is my code...

 

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="100%" style="border-collapse:collapse">
  <tr style="border-bottom: 1px solid #000000">
    <td> </td>
    <td> </td>
  </tr>
  <tr style="border-bottom: 1px solid #000000">
    <td> </td>
    <td> </td>
  </tr>
  <tr style="border-bottom: 1px solid #000000">
    <td> </td>
    <td> </td>
  </tr>
  <tr style="border-bottom: 1px solid #000000">
    <td> </td>
    <td> </td>
  </tr>
  <tr style="border-bottom: 1px solid #000000">
    <td> </td>
    <td> </td>
  </tr>
</table>
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.