溢出和父项拉伸的问题 [英] Problem with overflow and parent item stretching

查看:69
本文介绍了溢出和父项拉伸的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一种情况,我不清楚我设置错误的原因是什么。

我有下面的html片段:

I have run into a situation, where I am not clear what attribbutes I have set incorrectly.
I have the following snipit of html:

展开 | 选择 | Wrap | 行号

推荐答案


我不清楚我设置错误的属性。
I am not clear what attributes I have set incorrectly.



我也不确定。我也不清楚你希望完成什么。


支持最小/最大身高[1],除了在我们的好朋友IE / 6及以下。好消息(提供用户没有禁用js)是IE表达式。或javascript可用于模拟较低IE中的最小值/最大值。


我举了一个简单的例子[2]。名为.search的两个块都没有高度设置。名为.result的两个内部块都有一个最小高度:100px;。可以编程将文本放在顶部块中的行为。在内部块.result中放入足够的文本,它将推送到Equator而不会破坏外部包含块.search的底部。换句话说,顶部块总是打开 - 对它进行编程并且它将垂直扩展。底部块只是简单地手动添加文本,以显示如果文本被编程将如何扩展。我希望这有道理......?


[1]
css2.1 specs-- min / max height

[2]
简单示例

I''m not sure either. Nor is it exactly clear to me what you hope to accomplish.

Min/max height [1] is supported, except in our good friends IE/6 and down. The good news (providing the user does not have js disabled) is that "IE expressions" or javascript can be used to simulate min/max in the lower IEs.

I put up a simple example [2]. Both blocks named .search have no height set. Both inner blocks named .result have a set min-height: 100px;. The behavior to put text in the top block could be programmed. Put enough text in that inside block .result and it will push to the Equator without breaking out the bottom of the outside containing block .search. In other words, the top block is always open-- program it and it will expand vertically. The bottom block is simply text added manually to show how it will expand if that text were programmed. I hope this makes sense...?

[1]
css2.1 specs-- min/max height
[2]
simple example


我想我们需要看一些html来弄清楚发生了什么。
I think we need to see some html to figure out what''s going on.



[2]
简单示例



这个例子大致正是我想要做的。目前,我已删除所有高度属性,并让框保持折叠状态。如果你愿意的话。由于我将不得不继续开发IE6,我将不得不调查其他方法。


我的最终结果将是你的[2]示例中包含的内容,但是然后有一个最大限度也将开始滚动(也许?我不喜欢任何一个的外观)。


至于它做什么,我有一个包含许多字段的订单。左边是这个搜索的东西。该搜索的结果在单独的< div>中设置,并且在点击时,使用正确的结果填充字段。


问题出现可能有一个大号结果,我认为不好的做法是让它继续向下,迫使用户滚动整个页面(并丢失需要填写的字段的轨迹)以找到他们的结果。我可能只是把盒子的大小放回去并告诉它溢出:auto


我将尝试将其拆分为一个示例网页进行显示。

That example is roughly exactly what I wish to do. Currently, I have removed all height attributes and let the box stay "collapsed" if you will. Since I will have to continue to dev for IE6, I will have to investigate those other methods maybe.

My ultimate end result would be to incorporate what you have in your [2] example, but then have a maximum bound as well that will start to scroll(maybe? I don''t like the look of any of it though).

As for what its doing, I have an order form with many fields. Off to the left is this search thing. the results of that search are set in individual <div>s and when clicked, fills the fields with the correct results.

The problem came about with that there could be a LARGE number of results, and I think it bad practice to let it just keep going downward, forcing the user to scroll the WHOLE page (and losing track of the fields that need to be filled in) to possibly find their result. I might just put a size for the box back in and tell it to overflow:auto

I will attempt to break this apart into an example webpage to be shown.


这篇关于溢出和父项拉伸的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆