/ Published in: CSS
this is a lazy fix for a problem I came across. safari doubles the border spacing to divide table cells when using tbody ( I cant use borders+collapse, because of rounded tablecells :( )
Expand |
Embed | Plain Text
<style> td { background-color: green } table { border: 1px solid white; } /* switch just for safari */ @media screen and (-webkit-min-device-pixel-ratio:0) { table { border: 1px solid white; -webkit-border-vertical-spacing: 3px; padding-top: 2px; } } </style> <table width="300" border="0" cellspacing="5" cellpadding="0"> <tbody> <tr> <td><h1>with tbody tag</h1> </td> <td>dfhdfh </td> <td>ggg </td> <td>hdhd </td> <td>dfhdfh </td> </tr></tbody> <tbody> <tr> <td><h2>see the space above</h2> </td> <td> </td> <td>hdfhdfh </td> <td> </td> <td>dfhdfh </td> </tr> </tbody> </table>
You need to login to post a comment.
