Jump to content

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.

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.