css - How to specify the word-breaking conditions in IE? -


Specifically, say I have a string like ABC-123-NNN. I would like to paragraph a line break, but not to break on the dash.

i.e. If my text "serial number is not valid on ABC-123-NNN", then if I exceed the container width I want to put the whole serial number together.

Then the following is OK:

 The serial number ABC-123-NNN is not valid 

but the following (which is the behavior of IE6) is not: / P>

 serial number ABC-123-NNN is not valid 

Currently breaking on IE dash does it seem to have any applicable CSS or whatever I can apply to avoid it ?

To fix in IE: In the text, & lt; NOBR> tag, and then & lt; WRR> tag to indicate a break:

  & lt; Nobr & gt; Serial Number & lt; Wbr / & gt; ABC-123-NN & lt; Wbr / & gt; Not valid & lt; / Nobr & gt;  

Or to ensure that the serial number is intact:

  serial number & lt; Nobr & gt; ABC-123-NN & lt; / Nobr & gt; Not valid  

Note that this method is deprecated.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -