-2

I'm trying to make a table and I need to have divider like at this site, i.e. the divider between rows must be slim and grey. I'm trying this code, but it doesn't work:

<table rules="rows">
    <tbody>
        <?php
            foreach ($records as $record) {
                if (isset($record['translate'])) 
                {
                    echo '<tr>';
                    echo "<td width='500'>" . strip_tags($record['language_value']) . "</td>";
                    echo "<td width='200'>" . strip_tags($record['translate']) . "</td>";
                    echo '</tr>';
                }
            }
        ?>
    </tbody>
</table>
Chris
  • 44,602
  • 16
  • 137
  • 156
user1445877
  • 83
  • 1
  • 1
  • 8

1 Answers1

3

I think this is what you are looking for:

<table>
    <tr style="border-bottom: 1px dotted silver;">
        <td style="width:500px">foo</td>
        <td style="width:200px">bar</td>
    </tr>
    <tr style="border-bottom: 1px dotted silver;">
        <td style="width:500px">foo</td>
        <td style="width:200px">bar</td>
    </tr>
    <tr style="border-bottom: 1px dotted silver;">
        <td style="width:500px">foo</td>
        <td style="width:200px">bar</td>
    </tr>
</table>

This is inline CSS. Let me know if you need a CSS classes solution.

  • 1
    That way doesn't work for me, I had to do something like this - http://stackoverflow.com/questions/10040842/add-border-bottom-to-table-row – Mattl Feb 08 '13 at 16:55