如何防止从向下移动
我正在整理一个数据页。所有客户信息(例如电话、地址)都位于左侧,然后在右侧我们有关于它们的注释。问题是。添加的段落越多,左侧的信息就越被删除。我该怎么做才能使左侧信息面板保持不变,无论右侧显示多少数据。
下面是一些代码:
<div id="name">
Andrew Smith
</div>
<div id="otherinfo">
Paid.
</div>
<div id="itemheading">
About Client
</div>
<div id="itemholder1">
Here is the client informaiton. This is where the more info you
have the more the left side panel will be brought down.
</div>
<div id="itemheading">
Address
</div>
<div id="itemholder">
2000 sample st
<br>
san fran, ca
<br>
CSS:
#name {
padding-top:10px;
margin-left:35px;
font-weight:bold;
font-size:22px;
}
#otherinfo {
margin-left: 35px;
margin-top: 2px;
}
#itemheading {
margin-top:10px;
margin-left:35px;
font-weight:bold;
font-size:16px;
}
#itemholder1 {
margin-left: 35px;
margin-right: 200px;
margin-top:5px;
}
#itemheading {
margin-top:10px;
margin-left:35px;
font-weight:bold;
font-size:16px;
}
#itemholder {
margin-left: 35px;
}
I am organizing a data page. All client informaiton like telephone, address is on the left side and then on the right side we have notes about them. The thing is. The more paragraphs added, the more the information on the left gets brought down. What can i do so that the left side info panel stays the same regardless of how much data is being shown on the right.
below is some code:
<div id="name">
Andrew Smith
</div>
<div id="otherinfo">
Paid.
</div>
<div id="itemheading">
About Client
</div>
<div id="itemholder1">
Here is the client informaiton. This is where the more info you
have the more the left side panel will be brought down.
</div>
<div id="itemheading">
Address
</div>
<div id="itemholder">
2000 sample st
<br>
san fran, ca
<br>
CSS:
#name {
padding-top:10px;
margin-left:35px;
font-weight:bold;
font-size:22px;
}
#otherinfo {
margin-left: 35px;
margin-top: 2px;
}
#itemheading {
margin-top:10px;
margin-left:35px;
font-weight:bold;
font-size:16px;
}
#itemholder1 {
margin-left: 35px;
margin-right: 200px;
margin-top:5px;
}
#itemheading {
margin-top:10px;
margin-left:35px;
font-weight:bold;
font-size:16px;
}
#itemholder {
margin-left: 35px;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您有两列,一列在左侧,另一列在右侧。据我了解,您希望将信息添加到右侧列,但不会导致左侧列中的信息显示在其下方。
目前,您正在将左侧的 div 和右侧的 div 交错;相反,你应该只有两个 div,一个用于所有左侧的内容,另一个用于所有右侧的内容:
然后使用适当的 CSS 来显示它们。
You have two columns, one on the left, the other on the right. As I understand it, you want to add information to the right-hand column, without this causing information in the left hand column to display below it.
At the moment you are interleaving divs that go on the left and ones that go one the right; instead you should just have two divs, one for all the left-hand stuff and the other for all the right-hand stuff:
And then use appropriate CSS to display them.