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:

enter image description here

how can spacing this:

enter image description here

i tried putting jsfiddle, can't css jquery autocomplete (that works in app) work, let alone css line spacing added.

here anyway, fyi:

http://jsfiddle.net/2hwn4/

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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -