请问我有这个问题。我有两个并排的div,但第一个面板是第一个,而第二个面板的容器高度不好。我知道我写得不好,但我不知道更好。谢谢你的帮助。面板CSS高度
#container {
font-family: "Roboto", sans-serif;
width: 1000px;
border-radius: 1px;
position: relative;
z-index: 1;
background: #FFFFFF;
padding: 5px;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
margin-top : 50px;
}
#narrow {
position: relative;
width: 200px; //may be variable h
}
#wide {
position: absolute;
top: 0;
left: 50%;
margin-top: 220px;
margin-left: -150px; // half the width
width: 300px; // must be fixed
}
你能解释一下这个问题有点多。我无法正确理解它。该图像没有帮助。 – Aslam
你可以添加两个div和父级的HTML代码片段吗?我猜你想让这两个div的高度一致吗? – Gezzasa
为了使问题更加清楚,请在问题“第一个”和“第二个”中用适当的id -s代替:#narrow和#wide – Banzay