html - Prevent span elements from wrapping -


my ui shows list of email addresses retrieved backbone. rendered span of spans contain spans. here's typical generated html:

enter image description here

but getting breaks inside spans (notice beginning of angelstwo on 2 lines), because using wrong html tags (ul , li sounds better list). can this:

enter image description here

i tried divs got 1 entry per line , don't want that.

is there can make work spans? or should change else ul , li?

span elements are, default, inline elements. in inline formatting context boxes can wrap. (this happens text when wraps around floated image.)

div elements are, default, block elements. in block formatting context boxes occupy available horizontal space (width: 100%).

this why spans , divs aren't working want.

if switch display: inline display: inline-block, you'll block-level behavior, prevent wrapping line boxes, elements stack horizontally other inline elements.

w3c references:


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo