Jump to content

The table border not appear


skeener

Recommended Posts

The table border did not appear when there is no data queried from the database. It happens only in I.Explorer and not in firefox. how to overcome this problem in I.E ?

 

thus the table looks odd when there are some rows and columns which have no border lines.

 

helps is much appreciated

 

table.JPG

Link to comment
https://forums.phpfreaks.com/topic/37415-the-table-border-not-appear/
Share on other sites

here is the php part:

 

$table1 .= "  <tr>

   

    <td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$Staff_no1</td>

    <td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$thename</font></td>

    <td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$lanid</font></td>

    <td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$enrolldate</font></td>

    <td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$enrollstatus</font></td>

<td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$completiondate</font></td>

<td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$score</font></td>

 

  </tr> ";

 

 

and here is the html part:

 

<table width="100%" border="1" cellspacing="1" cellpadding="1" align="center">

    <tr bgcolor="#06AA3C">

    <td width="7%"><div align="center"><font face="Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF" size="2">Staff

        No.</font></strong></font></div></td>

    <td width="23%" height="43"> <div align="center"><font face="Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF" size="2">Name</font></strong></font></div></td>

    <td width="9%"><div align="center"><font face="Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF" size="2">Lan

        ID</font></strong></font></div></td>

    <td width="24%">

      <div align="center"><font face="Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF" size="2">Enrollment

        Date</font></strong></font></div></td>

    <td width="7%"><div align="center"><font face="Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF" size="2">Progress

        Status</font></strong></font></div></td>

    <td width="24%">

      <div align="center"><font face="Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF" size="2">Completion

        Date</font></strong></font></div></td>

    <td width="10%"><div align="center"><font face="Arial, Helvetica, sans-serif"><strong><font color="#FFFFFF" size="2">Score</font></strong></font></div></td>

  </tr>

  <?php echo $table1; ?>

</table>

 

thanks in advance.

take this line for example:

<td align=\"center\"><font size=\"2\" face=\"Arial, Helvetica, sans-serif\">$Staff_no1</td>

 

if (empty($Staff_no1)) $Staff_no1 = ' ';

of course, do this before it being output to table.

and do this for every instance that possibly be empty.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.