开发者

I was unable to center text on left side

开发者 https://www.devze.com 2023-01-05 11:03 出处:网络
<table> <tr&开发者_JS百科gt; <td class=\"left\"><div class=\"c\">centrated<br>on<br>lef side</div></td>
<table>
<tr&开发者_JS百科gt;
<td class="left"><div class="c">centrated<br>on<br>lef side</div></td>
<td>middle-td</td>
<td>right-td</td>
</tr>
</table>

Here is the CSS:

td.left {
    width: 200px;
    left-padding: 0;
    }
div.c {
    text-align: center;
    }

Now everything is centered. I want to place the div on left side and everything inside the div should be centered. I've tried everything that I can do but I was unable to do what I want.


use the float:left property on the div

0

精彩评论

暂无评论...
验证码 换一张
取 消