Krewe Posted August 28, 2012 Share Posted August 28, 2012 (edited) Hey Guys, 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) Here is the code to display: and here is the CSS for the tagHolder: p.tagHolder{margin-bottom:5px;line-height:25px;white-space: pre;} In firefox it doesn't even wrap, in chrome it wraps but part of the span stays on the line before it wraps. Any help would be awesome, thanks!Krewe Edited September 12, 2012 by Krewe Link to comment Share on other sites More sharing options...
ShadowMage Posted August 28, 2012 Share Posted August 28, 2012 What if you just get rid of the white-space property? By default, spans should wrap to a new line when they cannot fit on the current line (since they are inline elements). Link to comment Share on other sites More sharing options...
Krewe Posted August 28, 2012 Author Share Posted August 28, 2012 (edited) It fixes the firefox problem (kinda) but now in both browsers they partially break to a new line, the elements don't break fully.Attached is the new chrome image, won't let me upload both. However, they look very similar, except firefox doesn't put the sh- on a top line. Edited September 12, 2012 by Krewe Link to comment Share on other sites More sharing options...
ShadowMage Posted August 28, 2012 Share Posted August 28, 2012 Can you post the output HTML? Link to comment Share on other sites More sharing options...
Krewe Posted August 29, 2012 Author Share Posted August 29, 2012 People on stack fixed it span{display:inline-block;} Was all I need! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now