防止Twitter引导空白< dd>填充下一个<值 [英] Prevent Twitter bootstrap empty <dd> filling with next <dd> value

查看:120
本文介绍了防止Twitter引导空白< dd>填充下一个<值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello CSS gurus在那里,

Hello CSS gurus out there,

我喜欢twitter的bootstrap,我基于它的原型开发了很多项目,我遇到这个问题, dd标签里面没有HTML,另一个dd需要它的地方,我明白为什么这是发生,因为dl的样式,它允许dd扩展到多个行,如果内容需要,我不想要打破这个可爱的造型,我只是想修改它,所以如果dd值是空的,它只是不会崩溃,所以之前我做任何疯狂在这里像服务器端隐藏空值,或修改原始的行为,甚至添加jQuery,我想知道如果有人可以帮助,这是一个图片进一步说明我在说什么,它的RTL所以dt是在右边。

I love the twitter bootstrap, and I am prototyping a lot of projects based on it, I encountered this problem, where if the dd tag has no HTML inside of it, another dd takes it's place, I understand why this is happening, because of the way the dl is styled it allows dd to expand to more than one row if the content needs to, i don't want to break this lovely styling, i just want to modify it so if the dd value is empty, it just won't collapse, so before i do anything crazy here like server side to hide empty values, or modifying the original behavior or even adding jQuery, i wanted to know if anyone could help, this is a picture to illustrate further what i am saying, it's RTL so the dt is on the right.

img src =https://i.stack.imgur.com/6XVD3.pngalt =>

推荐答案

我使用此样式覆盖。

.dl-horizontal > dd:after {
  display: table;
  content: "";
  clear: both;
}

这篇关于防止Twitter引导空白< dd>填充下一个<值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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