mobile - CSS spacing after each item in list with responsive web design -
i generating bulleted list on web site (by using jquery auto-complete function) , using responsive web design in web site.
i want space after each list item. have added following css so:
li { margin-bottom:20px; }
however, when there word wrap on list item (say on mobile device), total line spacing not change.
i don't proper spacing between bottom of word wrapped item , next item.
the display looks this:
how can spacing this:
i tried putting jsfiddle, can't css jquery autocomplete (that works in app) work, let alone css line spacing added.
here anyway, fyi:
are familiar css specificity? http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/
if code fiddle posted, inspecting li
item in autocomplete show following attributes being applied (coming jquery ui css file):
.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
this rule more specific your
li { margin-bottom:20px; }
so, actual bottom margin being applied 0. fix this, can margin-bottom: 20px !important;
(*not recommended), or use same selector overwrite jquery ui (assuming css loaded after jquery ui css) this:
.ui-menu .ui-menu-item { margin-bottom: 20px; }
Comments
Post a Comment