How do I get the table out of the tab

0

I'm having a hard time putting a table inside a tab because it always stays out.

I have the following code:

  echo'<div id="tabs-1">


  <p><b>Alvará: </b></p>';
    echo '<table width=500>
    <tr>
    <td><b>Número</b></td>
    <td><b>Validade</b></td>
    <td><b>Anexo</b></td>
    </tr>';
    echo "<td>".$exibe['AlvaraNumero']."</td>";
    if ($exibe['AlvaraValidade']) { 
    if (strtotime($exibe['AlvaraValidade']) < time())  {
    echo "<tr>";
    echo " <td>'<span style='color:red'>".$exibe['AlvaraValidade']."</span>'</td>";
    }else{
    echo " <td>".$exibe['AlvaraValidade']."</td>";
    }
    echo "<td><a href='MostrarAlvara.php?id=".$exibe['id']."'>Ver PDF </a></td>";
    echo "</tr>";
    }
    echo '</table>';
  '</p>
  </div>';
    
asked by anonymous 02.07.2014 / 18:10

1 answer

1

This table does not look very well built. That may be the problem. I do not know how the table looks, but will it be something like ...?

echo'
<div id="tabs-1" style="overflow:auto;">
    <p><b>Alvará: </b></p>';
echo '
<table width=500>
    <tr>
        <td><b>Número</b></td>
        <td><b>Validade</b></td>
        <td><b>Anexo</b></td>
    </tr>
    <tr>
        <td>' . $exibe['AlvaraNumero'] . '</td>';

if ($exibe['AlvaraValidade']) {
    if (strtotime($exibe['AlvaraValidade']) < time()) {
        echo " <td>'<span style='color:red'>" . $exibe['AlvaraValidade'] . " </span>'</td>";
    } else {
        echo " <td>" . $exibe['AlvaraValidade'] . "</td>";
    }
    echo "<td><a href='MostrarAlvara.php?id=" . $exibe['id'] . "'>Ver PDF </a></td>";
}
echo '
        </tr>
    </table>
</div>
';
    
04.07.2014 / 19:33