[svlug] No wrap <span>?

Steve Litt slitt at troubleshooters.com
Wed Jan 28 16:42:07 PST 2015


On Wed, 28 Jan 2015 16:24:17 -0800
Don Marti <dmarti at zgp.org> wrote:

> 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.
>   https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
> 
>  nowrap
>      Collapses whitespace as for normal, but suppresses
>      line breaks (text wrapping) within text.
> 
>  pre
>      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.
>   https://developer.mozilla.org/en-US/docs/Web/CSS/word-wrap


Thanks Don,

This is precisely what I needed. And thanks for the great link to other
CSS stuff!

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance




More information about the svlug mailing list