CSS table - column width adjustment

WONG Tony 161 Reputation points
2023-03-15T09:53:20.6066667+00:00
i wish to make a table

1. column 1 wrap must be true

2. if column 1 has short text, column 2 push to the left

3. if column 2 has long text or multiline, column 2 push to the right within 100% width of the table

Thanks a lot.

*********************************************

<table style="width:100%"> 

  <tr> 

    <td style="background-color:yellow"> 

      ABC sdj flajks djafk s;lfj a;lsdfj asldjfasjl;kdf ;jklfj ;sd fal;sdjf l;asjdasjk dfajkl sd;faj sldfj alsdfj la sdjklf;a sdjf al;sdfj l;asdj fjkl 

    </td> 

    <td style="width:100%;background-color:blue">XYZ</td> 

  </tr> 

</table>
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,272 questions
{count} votes