LoginSignup
6
6

More than 5 years have passed since last update.

Twitter Bootstrap の .dl-horizontal で dd が空の時にずれるのを直す

Posted at

そもそも dd の中身が空でいいかどうかは置いておいて・・・。dd を clearfix すれば良いようです。

生の CSS を書いている場合は以下。

.dl-horizontal dd {
  *zoom: 1;
}
.dl-horizontal dd:before,
.dl-horizontal dd:after {
  display: table;
  line-height: 0;
  content: "";
}
.dl-horizontal dd:after {
  clear: both;
}

LESS を使っている場合は以下。

.dl-horizontal dd {
  .clearfix();
}

参考
http://stackoverflow.com/questions/10566451/prevent-twitter-bootstrap-empty-dd-filling-with-next-dd-value

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6