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

dl horizontal issue #2824

Closed
sannefoltz opened this issue Mar 27, 2012 · 6 comments
Closed

dl horizontal issue #2824

sannefoltz opened this issue Mar 27, 2012 · 6 comments

Comments

@sannefoltz
Copy link

Hello,

The dl horizontal list breaks apart if usage with not so beautiful data. If you try building a list with fields from a database, it's realistic these values or keys aren't as nicely formed as you wanted. You can solved it of course by sanitizing everything in the backend but still it's realistic some values (dd) could be empty or the length of the key/values are actually longer than the 130px set width.

here's something I came up with to fix/demonstrate the problem
http://jsfiddle.net/XRPwb/2/

Regards Sanne

@mdo
Copy link
Member

mdo commented Mar 27, 2012

Our goal isn't to provide styles for every situation or use case, but to find common components we can provide a base for. This is one of those latter cases—we've provided the core styles, and you have a custom use for the component. We won't be merging this into the core. Thanks though!

@shanepinnell
Copy link

I agree that this should be fixed, I am not versed enough in Bootstrap to know what the best fix is, but I added a non-breaking space after each dd element in a dl.dl-horiztonal

dl.dl-horizontal {
    dd:after {
        content: "\0000a0";
    }
}

Not pretty, but it prevents the dd elements from encroaching upon one another if they have no content.

@carlosfilho88
Copy link

lelio98, it works! Thanks!

@shanepinnell
Copy link

@carlosfilho88 my pleasure! It was a pain finding the right code for an nbsp to use in CSS.

@brianlong
Copy link

This trick worked for me too. Thanks!

@fguillen
Copy link

+1 to the @carlosfilho88 trick

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
None yet
Projects
None yet
Development

No branches or pull requests

6 participants