Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting proportional column width with <col width="x*" />

I am trying to set proportional column width with <col width="x*" />:

<table width="600px">
    <col width="1*" />
    <col width="2*" />
    <col width="3*" />
    <tbody>
        <tr>
            <td style="border: 1px solid black;">AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA AAA
            </td>
            <td style="border: 1px solid black;">BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB BBB
            </td>
            <td style="border: 1px solid black;">CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC CCC
            </td>
        </tr>
    </tbody>
</table>

Despite setting proportions in <col> tag, column widths are equal. What do I do wrong?

like image 226
LukLed Avatar asked Oct 26 '22 23:10

LukLed


1 Answers

you could use 17%, 34%, and 49%. for 1:2:3

like image 147
carillonator Avatar answered Oct 28 '22 13:10

carillonator