[svlug] No wrap <span>?

Don Marti dmarti at zgp.org
Wed Jan 28 16:24:17 PST 2015

begin Sarah Newman quotation of Wed, Jan 28, 2015 at 04:04:35PM -0800:
> On 01/28/2015 03:54 PM, Steve Litt wrote:
> > Hi all,
> > 
> > I want my <span class="code">I don't want wraps in here</span> to
> > refuse to word wrap. The word-wrap property can make stuff wrap inside
> > words, but nothing I've found can prevent word wrapping completely,
> > within a <span/>.
> > 
> > Anyone know how to do it?
> Is this what you want?
> http://www.htmlcodetutorial.com/linepar/_PRE.html

Another option is to use the "white-space" CSS property.

     Collapses whitespace as for normal, but suppresses
     line breaks (text wrapping) within text.

     Sequences of whitespace are preserved, lines
     are only broken at newline characters in the
     source and at <br> elements.

"word-wrap" seems to do something different.

Don Marti                    
dmarti at zgp.org

More information about the svlug mailing list