HTML Table width in percentage, table rows separated equally -
when create table in html, table width of 100%, if want cells (tds) divided in equal parts, have enter width % each cell? "obliged" it?
e.g.:
<table cellpadding="0" cellspacing="0" width="100%" border="0"> <tr> <td width="25%"></td> <td width="25%"></td> <td width="25%"></td> <td width="25%"></td> </tr> </table>
or following right procedure, not write width in each tds if want each of them devided equally:
<table cellpadding="0" cellspacing="0" width="100%" border="0"> <tr> <td></td> <td></td> <td></td> <td></td> </tr> </table>
i know works both manners want know "legit" way it.
you need enter width % each cell. wait, there's better way that, it's called css:
<style> .equaldivide tr td { width:25%; } </style> <table class="equaldivide" cellpadding="0" cellspacing="0" width="100%" border="0"> <tr> <td></td> <td></td> <td></td> <td></td> </tr> </table>
Comments
Post a Comment