bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

dl horizontal issue

Open sannefoltz opened this issue 14 years ago • 6 comments

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

sannefoltz avatar Mar 27 '12 12:03 sannefoltz

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!

mdo avatar Mar 27 '12 16:03 mdo

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.

shanepinnell avatar Jul 12 '12 15:07 shanepinnell

lelio98, it works! Thanks!

carlosfilho88 avatar Sep 03 '12 01:09 carlosfilho88

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

shanepinnell avatar Sep 19 '12 16:09 shanepinnell

This trick worked for me too. Thanks!

brianlong avatar Mar 24 '13 17:03 brianlong

+1 to the @carlosfilho88 trick

fguillen avatar Jun 17 '13 20:06 fguillen