html 高度不够,HTML/CSS:Div未扩展到内容高度

我有几个未扩展的div元素以匹配其内容的高度。我已经读过,这可能是由浮动内容引起的;这个内容不是浮动的 - 虽然我开始觉得我应该把我的电脑扔在河里。这算不算?HTML/CSS:Div未扩展到内容高度

代码:

#interaction-options-container.display-dialogue {

left: 15%;

width: 70%;

}

#interaction-options-container.full-border, .dialogue-container.full-border {

border: 1px solid #33ffff;

}

#interaction-options-container {

margin: 4px 0px 4px 0px;

z-index: 100;

position: absolute;

left: 35%;

bottom: 4%;

width: 30%;

line-height: 1.4;

opacity: 0.75;

}

#interaction-options-container .heading {

font-size: 16px;

color: black;

padding: 0.1px 12px 0.1px 12px;

background-color: grey;

}

.heading {

font-weight: bold;

font-size: 1.5em;

padding: 8px 12px 0px 12px;

}

#interaction-options-container p {

margin: 8px 0px 8px 0px;

}

#interaction-options-container .dialogue p {

margin: 4px 0px 4px 0px;

}

#interaction-options-container .button, #interaction-options-container .evidence-options-container .button {

cursor: pointer;

color: white;

font-size: 14px;

padding: 0.1px 12px 0.1px 12px;

background-color: #333333;

opacity: 0.85;

border-bottom: 1px solid #8d8d8d;

}

#interaction-options-container .dialogue-container {

padding: 0px;

margin: 0px;

width: 100%;

height: 32px;

background-color: #333333;

float: none;

}

#interaction-options-container .dialogue {

text-align: center;

margin: auto;

font-size: 16px;

font-weight: bold;

padding: 1px 12px 1px 12px;

color: white;

background-color: #333333;

}

.dialogue-container .dialogue.option-divider {

border-bottom: 1px solid #333333;

}

* {

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

}

Choose a reply:

Option one here

Option two here

Option three here

Option four here. As an example this text should be long enough to require wrapping to a new line. I will therefore have to keep typing until I've added enough text to sufficiently fill the horizontal with of the containing div. Also, thanks for potentially answering my question, which I will get to below...

的问题是,当一段对话需要包装到一个新的路线,.dialogue-container .button DIV不高扩展匹配.dialogue的height DIV。因此内部divs延伸越过边界线,这看起来很糟糕。

如果有人有任何指示,我的电脑会感谢你。 干杯。

+1

'#interaction-options-container {display:none}' - 这是一种新的笑话吗? –

+0

我没有包含JavaScript文件;该特定的div开始隐藏并在需要时显示。应该采取了这条线,对不起。 –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值