html - text in table cells not centered as in headers -


css:

.one {     width: 13%; }  .two {     width: 30%; }  .three {     width: 30%; } 

html:

<table>     <tr>         <th class= "one">quantity</th>         <th class= "two">info</th>         <th class= "three">price</th>     </tr>     <tr>         <td class = "one"><input type="text" name="quantity1" value=""/>         <td class = "two">cheap monday jeans 30/34 </td>         <td class = "three">$39.99 </td>     </tr>     <tr>         <td class = "one"><input type="text" name="quantity2" value=""/></td>         <td class = "two">herschel bag (free) </td>         <td class = "three">$129.99 </td>     </tr>     <tr>         <td class = "one"><input type="text" name="quantity3" value=""/></td>         <td class = "two">diesel t-shirt (s) </td>         <td class = "three">$59.99 </td>     </tr>     <tr>         <td class = "one"><input type="text" name="quantity4" value=""/></td>         <td class = "two">superdry patrol lite jacket (m) </td>         <td class = "three">$129.99 </td>     </tr>     <tr>         <td class = "one"><input type="text" name="quantity5" value=""/></td>         <td class = "two">i love canada t-shirt (s) </td>         <td class = "three">$19.99 </td>     </tr> </table> 

i want table rows (clothes information & prices) aligned right below table headers. don't know why table rows skewed left , cannot aligned right below headers.

enter image description here

first of forgot close td after first input.

 <td class = "one"><input type="text" name="quantity1" value=""/></td> 

you can add css make them center

td {     text-align:center;     } 

have on example


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -