8

I am having some issues with wrapping stuff to a new line when it reaches the max width. I have my blog set up displaying all of the tags in a single div, and when the first line reaches the max width the next tag should jump to the next line. (Attached is what is happening in Chrome and Firefox)

http://jsfiddle.net/QHWNF/7/

Here is the CSS Code:

p.tagHolder{
margin-bottom:5px;
line-height:25px;}

All the HTML/PHP is:

<a href="#"><span>TagName</span></a><a href="#"><span>TagName2</span></a>....

Chrome Firefox

4

2 に答える 2

18

スパンをに設定してみてくださいdisplay: inline-block

http://jsfiddle.net/QHWNF/10/

于 2012-08-28T20:23:51.147 に答える
0

Add word-wrap: normal; and word-break: normal; to your span and p container. This would make sure that words are broken only at allowed break-points when there's need for wrap.

I hope that helped!

于 2012-08-28T20:16:12.770 に答える