html - 等柱高

标签 html css

我希望东西 div 向下延伸以匹配中心 div 的高度...可能吗?

非常感谢。

.con{
padding-left: 22px;
padding-right: 22px;
overflow: hidden;
}

.col{
position: relative;
float: left;
}

.west{
width: 7px;
right: 22px; 
margin-left: -100%;
background: url(http://www.example.com/west.png) repeat-y;
padding: 0 0 0 15;
}

.east{
width: 7px;
margin-right: -22px;
background: url(http://www.example.com/east.png) repeat-y;
padding: 0 15 0 0;
}

.center{
width: 100%;
}


<div class="con">
  <div class="center col">
   Test Text<br/>
   Test Text<br/>
   Test Text<br/>
   Test Text<br/>
  </div>
  <div class="west col">
 </div>
 <div class="east col">
 </div>
</div>

最佳答案

您可以从此处针对纯 CSS 所做的工作开始: HTML/CSS: Making two floating divs the same height

或者使用 JavaScript 布局。

关于html - 等柱高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3006294/

相关文章:

html - 如何制作圆角的div

html TD全宽重叠其他

html - IE8 在 IIS 上不显示背景图像

html - 过渡发生时的图片 CSS

php - 绝对位置从图像中删除超链接。

css - 如何让内部 div 溢出父级?

html - 在 Bootstrap 3 中增加位置绝对元素的表单输入宽度

javascript - 根据图像选择更改背景图像 CSS 属性

javascript - hr在移动端div后面

css - 购物车 "add to cart"按钮样式问题