-3
<div class="wrapper">
    <div class="left-bg bg-part" id="left-bg">

    </div>

    <div class="content-hold" id="content-hold">
 </div>
    <div class="right-bg bg-part" id="right-bg">

    </div>

</div>

here is the less css code I write.

 .wrapper {
        .bg-part {
          width: 30px;
          background: #a2ca46;
          height: 100%;
          position: absolute;
          top: 0;

        }
        .left-bg {
          float: left;
          left: 0;
        }
        .right-bg {
          float: right;
          right: 0;
        }
    }

when content take more place on page the left side and right side's height never incrase. what should I do to make left-bg and right-bg lever to the content-hold's width.

4

1 回答 1

0

一种选择是使用一行三列的 html 表格。根据需要将左右列的宽度设置为 30px。

于 2012-10-25T08:08:29.477 回答