Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty <dd> tags mis-aligns <dd> that follow #6707

Closed
eleven41 opened this issue Jan 25, 2013 · 1 comment
Closed

Empty <dd> tags mis-aligns <dd> that follow #6707

eleven41 opened this issue Jan 25, 2013 · 1 comment
Labels

Comments

@eleven41
Copy link

When an empty or self-closing <dd> tag is used in a horizontal <dl>, the <dd> tags following it are mis-aligned with the matching <dt> tags.

 <dl class="dl-horizontal">
   <dt>Title 1</dt>
   <dd>Description 1</dd>

   <dt>Title 2</dt>
   <dd></dd>

   <dt>Title 3</dt>
   <dd>Description 3</dd>
</dl>

Here is a jsFiddle: http://jsfiddle.net/xjQX3/

In the above example, "Description 3" will sit beside "Title 2". It should sit beside "Title 3". If the <dl> is not horizontal, then they appear as expected.

@mdo
Copy link
Member

mdo commented Feb 2, 2013

This is a common problem of using floats without any content to float against—the content below it will wrap up and there is no easy way to fix it other than a clearfix on an immediate parent. Since there is no parent around each dt and dd pairing, there's not much you can do.

@mdo mdo closed this as completed Feb 2, 2013
mdo added a commit that referenced this issue Jun 17, 2013
Instead of clearing the entire `.dl-horizontal`, we've moved the
clearfix mixin to the `dd` level to solve two problems in one: empty
`dd`s mid-list, and empty `dd` as the last child.

Addresses a few old issues, including #2824, #3819, #3821, #4062,
#6707, and #7180.

Sorry that took so long :D.
stempler pushed a commit to stempler/bootstrap that referenced this issue Apr 11, 2014
Instead of clearing the entire `.dl-horizontal`, we've moved the
clearfix mixin to the `dd` level to solve two problems in one: empty
`dd`s mid-list, and empty `dd` as the last child.

Addresses a few old issues, including twbs#2824, twbs#3819, twbs#3821, twbs#4062,
twbs#6707, and twbs#7180.

Sorry that took so long :D.
stempler pushed a commit to stempler/bootstrap that referenced this issue Nov 4, 2014
Instead of clearing the entire `.dl-horizontal`, we've moved the
clearfix mixin to the `dd` level to solve two problems in one: empty
`dd`s mid-list, and empty `dd` as the last child.

Addresses a few old issues, including twbs#2824, twbs#3819, twbs#3821, twbs#4062,
twbs#6707, and twbs#7180.

Sorry that took so long :D.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant