如何防止
从向下移动

发布于 2024-10-22 01:31:03 字数 1167 浏览 1 评论 0原文

我正在整理一个数据页。所有客户信息(例如电话、地址)都位于左侧,然后在右侧我们有关于它们的注释。问题是。添加的段落越多,左侧的信息就越被删除。我该怎么做才能使左侧信息面板保持不变,无论右侧显示多少数据。

下面是一些代码:

<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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北渚 2024-10-29 01:31:03

您有两列,一列在左侧,另一列在右侧。据我了解,您希望将信息添加到右侧列,但不会导致左侧列中的信息显示在其下方。

目前,您正在将左侧的 div 和右侧的 div 交错;相反,你应该只有两个 div,一个用于所有左侧的内容,另一个用于所有右侧的内容:

<div id='left'>
all the stuff that goes in the left-hand column,
name, 
address, 
etc
</div>

<div id='right'>
everything that goes in the right-hand column
</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:

<div id='left'>
all the stuff that goes in the left-hand column,
name, 
address, 
etc
</div>

<div id='right'>
everything that goes in the right-hand column
</div>

And then use appropriate CSS to display them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文