html - How to justify css table cells? -


well have css table looks this

------------------------------------------------------------- |     first    |    middle1    |    middle2    |    last    | ------------------------------------------------------------- 

i'm looking design

------------------------------------------------------------- | first        |    middle1    |    middle2    |       last | ------------------------------------------------------------- 

first column aligned left, middle columns aligned center, , last column aligned right. i'm using solution targets :first-child , :last-child in order align them specifically. there better/smarter way?

use td align attribute:

td {    min-width:100px;    border:1px solid black;  }
<table>    <tr>      <td align="left">left</td>      <td align="center">center</td>      <td align="center">center</td>      <td align="right">right</td>    </tr>  </table>


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -