Border not showing up in table, HTML, CSS, PHP -


the border isn't showing in table reason when i'm using css style it. however, if style in directly inside table tag, works. please take @ code:

test.php

<head> <style>  table { border: 1px solid black; }  </style> </head>  <?php  echo "<body>"; echo "<table>"; echo "<tr>";  echo "<td> hello1 </td>"; echo "<td> hello2 </td>"; echo "<td> hello3 </td>";  echo "</tr>"; echo "</table>"; echo "</body>";  ?> 

try code...

table {      border-collapse: collapse;  }    table td {      border: 1px solid #333;  }
<html>    <head><title>demo</title></head>    <body>      <table>        <tr>          <td>test1</td>          <td>test2</td>          <td>test3</td>          <td>test4</td>        </tr>      </table>     </body>  </html>


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -