How do I force to display a word in a given sentence starting with "(" in new line?

I have the following data returned by a service and we're using DIV tag with a fixed width. As expected, DIV tag is not chopping the words in the middle but it is not displaying the words starting with "(" in  new line. Is there a way to fix this issue? Thanks in advance.
Actual Result
-----------------------
Departs: 11:25 AM
Thu Mar 31 2011
San Bernardino, CA  (
SNB)

Expected Result
------------------------
Departs: 11:25 AM
Thu Mar 31 2011
San Bernardino, CA  (SNB)

violetbkAsked:
Who is Participating?
 
imantasConnect With a Mentor Commented:
Try surrounding it witha non wrapping span:
<div class="avs_column dep_arr_data" style="width: 190px">
                        <div class="dep_data">
                              
                                    <span id="_depart_time_span" style="display:none">2011-03-31T05:20:00.000-07:00</span>
                                    <span id="_depart_multicity_span" style="display:none"><!-- mp_trans_disable_start --><b>San Bernardino, CA<br></b>San Bernardino<br>  (SNB)<br><!-- mp_trans_disable_end --></span>
                              
                              <span class="time_point">Departs: 5:20 AM</span><br/>
                              Thu Mar 31 2011<br/>
                              <!-- mp_trans_disable_start --><span style="white-space: nowrap">San Bernardino, CA (<a href="javascript:var child=window.open('http://someUrl.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&code=SNB','station','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();">SNB</a>)</span><!-- mp_trans_disable_end -->
                              <br /><a style="display:none" href="" name="selecttrainDepNews_SNBBFD2011-03-31">Station News</a>
                        </div>

Open in new window

0
 
JF0Commented:
Can you post some code that replicates this? Normal behavior will not cause '(SNB)' to break like you are showing.
0
 
violetbkAuthor Commented:
<div class="avs_column dep_arr_data">
                        <div class="dep_data">
                              
                                    <span id="_depart_time_span" style="display:none">2011-03-31T05:20:00.000-07:00</span>
                                    <span id="_depart_multicity_span" style="display:none"><!-- mp_trans_disable_start --><b>San Bernardino, CA<br></b>San Bernardino<br>  (SNB)<br><!-- mp_trans_disable_end --></span>
                              
                              <span class="time_point">Departs: 5:20 AM</span><br/>
                              Thu Mar 31 2011<br/>
                              <!-- mp_trans_disable_start -->San Bernardino, CA&nbsp;&nbsp;(<a href="javascript:var child=window.open('http://someUrl.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&code=SNB','station','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();">SNB</a>)<!-- mp_trans_disable_end -->
                              <br /><a style="display:none" href="" name="selecttrainDepNews_SNBBFD2011-03-31">Station News</a>
                        </div>
</div>
0
 
JF0Commented:
I see that shown exactly as your expected result.
0
 
violetbkAuthor Commented:
Please see the attached screenshot.
Issue-With-Picture.png
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.