我正在尝试将一些 CSS 设置为具有 3 列。
中间和右边的列可以包含文本。我目前拥有它,以便中间列将换行文本,所有其他列将根据该列调整大小。我需要右列以相同的方式影响其他列。我不是 CSS 专家,主要使用 C# 编写代码。
我尝试过其他解决方案,这是最接近我想要的解决方案。有什么想法吗?
到目前为止的 CSS:
#outer
{
width: 100%;
margin: auto;
padding:0;
}
#leftcolumn
{
position: absolute;
height: 100%;
width: 5px;
-webkit-border-radius: 0px;
margin: 0 ;
background-color: Yellow;
z-index:10;
left:0px;
top:0;
}
#rightcolumn
{
position: absolute;
height: 100%;
width: 75px;
-webkit-border-radius: 0px;
margin: 0 ;
background-color: green;
right:0px;
top:0;
}
#middlecolumn
{
-webkit-border-radius: 0px;
margin-left:5px;
margin-right:75px;
background-color: #62A9FF;
left:0px;
top:0px;
}
#inner
{
width:100%;
margin:0 auto;
position: relative;
-webkit-transform: rotate(0deg);
-webkit-transform-origin:50% 50%;
}
最佳答案
使用 display: table-cell;
非常简单。
关于html - CSS 列保持相同的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20158040/