Can you mix% and px to align the table?

I'm trying to align different tables with different number of columns, so the first two columns are aligned and the rest are independent, but using% is very difficult, and when the window is resized, the loss is balanced.

This is why I tried to align the mix with% and px on td, ex.

<table>
  <tr>
    <td width="100px"></td>
    <td width="100px"></td>
    <td width="50%"></td>
    <td width="20%"></td>
 </tr>
</table>
<table>
 <tr>
   <td width="100px"></td>
   <td width="100px"></td>
   <td width="70%"></td>
 </tr>
</table>

But as it does not look logical, it does not seem to work.

Is there any way to get this job or an alternative?

+3
source share
4 answers

colspan. , , TD + , ( 1). , , , .

, , ( TD-, TDs, ), , , ( rtl CSS), , TD , colspan ( , TD , )


EDIT: , , . 2 , (DIV), , 100%. div, . , , , , .

+2

... ?. . ...

+4

% px, % . 500px, 50% 250px ..

, . , , , , .

+1

width style:

td style="width:120px"
-1

Source: https://habr.com/ru/post/1728655/


All Articles