I have a Checkbox with text that is fairly lengthy as shown below. One thing we don't want is for the text to wrap below the checkbox. What I have done to fix this is to put spaces. Also not that part of the text is bold as well:
<asp:CheckBox ID="chkOption1" runat="server" /> <b><u>Option 1</u></b> - Attend in person. This is the best way to gain critical knowledge and express your thoughts and opinions.<br /> Ample time will be provided for individual discussions during breaks and at the networking reception.
Is there a way for the text not to wrap below the checkbox and still have the boldness in the text I need?
Note that I still want the text to wrap but not below the checkbox. Meaning it should wrap below the previous line's text.
From the moment you have the text outside of your check box you can warp it with a span
and nowrap
style as:
<span style="white-space: nowrap;">
<asp:CheckBox ID="chkOption1" runat="server" /> <b><u>Option 1</u></b> - Att ........
</span>
if you place your text inside the text of your check box, you can use the style
attribute as:
<asp:CheckBox runat="server" ID="chkOption1" style="white-space: nowrap;" Text="too long text" />
The render html is the same.
This link describes a solution. In short:
float: left
display: table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With