小编giv*_*les的帖子

如何在不使用表的情况下制作这个2列表?

http://jsfiddle.net/pkLMC/

左列应缩小以适合,右列应占据页面宽度的其余部分.它也需要与IE7一起使用

问题的形象

http://i.stack.imgur.com/4Q8aW.png

<style>
table
{
    width:100%;
    border:1px solid black;
}
td
{
    vertical-align:top;
    border:1px solid green;
    background-color:orange;
}
.left
{
    /* trim the column to the minimum necessary width required to avoid overflow */
    width:1px;
}
.long
{
    /* this layout works whether the content of the right column wraps or not */
    /* display:none; */
}
</style>

<table>
<tr><td class="left">ABC</td><td>Lorem ipsum dolor</td></tr>
<tr><td class="left">ABCDE</td><td>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut …
Run Code Online (Sandbox Code Playgroud)

html css

4
推荐指数
1
解决办法
189
查看次数

标签 统计

css ×1

html ×1