有人可以解释如何更改my example以便它具有:
小提琴:http://jsfiddle.net/QG98e/ - 尝试使用浮点数,但中间列的内容会溢出,在右/左列中流动:
来自上述小提琴的标记
HTML:
<p>other content above</p>
<div id="container">
<div id="left">
<button>foo</button>
<button>bar</button>
</div>
<div id="center">
blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
</div>
<div id="right">
<a href="#">curly</a>, <a href="#">moe</a>
</div>
</div>
<p>other content below</p>
CSS:
#container {
border: 1px solid #808080;
clear: both;
}
#left {
float: left;
}
#right{
float: right;
}
答案 0 :(得分:-1)
#container {
position: relative;
border: 1px solid #808080;
height: 100px;/*define you*/
width: 100%;
}
#left {
position: absolute;
width: 20%;
height: inherit;
left: 0;
}
#center{
position: absolute;
width: 56%;
height: inherit;
left: 20%;
}
#right{
position: absolute;
width: 20%;
height: inherit;
right: 0;
}