-2

I wanted to have a list of checkbox items in a string collection editor, but one of the item is too long so I wanted it to put in a newline.

My list goes like this
*Sleeveless, halters, tube, strapless, backless
*Spaghetti straps, plunging necklines, and like
*Tight fitting, blouses and dresses
*Beach clothes, blouses which do not cover the mid-body parts
*Short dresses and skirts that are more than two(2) inches above the middle of the knee

But I wanted to be like this

*Sleeveless, halters, tube, strapless, backless
*Spaghetti straps, plunging necklines, and like
*Tight fitting, blouses and dresses
*Beach clothes, blouses which do not cover the mid-body parts
*Short dresses and skirts that are more than two(2) inches
above the middle of the knee

I want the last item to be in 2 lines but only count as one item, cause I know if you put it in a new line it will count as another item. Thanks. :D

1 Answers1

0

Assuming you are using asp.net webform. I have checked only against the bigger text from your example. Check below html code for your reference.

[![<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

<style type="text/css" media="all">
    .checkboxlist_nowrap tr td label
    {
        white-space:nowrap;
        overflow:hidden;
    }
</style> 
</head>

<body>
    <form id="form1" runat="server">
    <div style="border: solid 1px blue; width:300px">
    <asp:CheckBoxList ID="CheckBoxList2" runat="server">
        <asp:ListItem Value="0" Text="line 0"></asp:ListItem>
        <asp:ListItem Value="1" Text="*Short dresses and skirts that are more than two(2) inches above the middle of the knee "></asp:ListItem>
    </asp:CheckBoxList>
</div> 
    </form>
</body>
</html>][1]][1]
LifeOfPi
  • 625
  • 5
  • 19