如何将文本放在 Div 中的同一行?

How to position text on same line in Div?

我想在 div 中放置文本,以便文本行保持在同一行而不是换行。

我尝试通过添加一些示例文本将 nwrp 属性 添加到 div,但如下面的屏幕截图所示,文本换行:

<div runat="server" id="OfferStatusString" class="col-xs-3 col-sm-3 col-md-2 nwrp"><p><strong>This text is strong, testing that the text doesn't wrap to the next line using nwrp property of bootstrap. Text should stay on the same line on the window</strong>.</p></div>

有谁知道如何指定 div 文本定位以保持在同一行?

此 div 包含在 Repeater 控件中,如下所示:

<asp:Repeater ID="repeaterApplicationItems" runat="server" OnItemDataBound="repeaterApplicationItems_ItemDataBound" >
                                <ItemTemplate>
                                    <div class="row applicationitems mrgn lhgt">

                                        <div runat="server" id="OfferStatusString" class="col-xs-3 col-sm-3 col-md-2 nwrp"><strong><%# (string)Eval("ApplicationItemStatusString").ToString() %></strong></div>


                                    </div>
                               </ItemTemplate>
                            </asp:Repeater>

所以用这个:

div {
    overflow: hidden;
    white-space: nowrap;
}

jsFiddle