0

How to increase the width of checkbox list item text,

I have more space on right side but the text is coming in multiple lines but not coming to right side.

and also it is possible to place the checkbox left to the text?

Thanks in advance

<asp:CheckBoxList ID="cbList" runat="server" Width="300px" ForeColor="Black" TextAlign="Right">
 <asp:ListItem Value="10" Text="Invoice" ></asp:ListItem>
 <asp:ListItem Value="20" Text="Payments"></asp:ListItem>
 <asp:ListItem Value="30" Text="General Ledger posting"></asp:ListItem>
 </asp:CheckBoxList>



.chkBoxList td
{
   width:120px; /* or percent value: 25% */
}

where the list item 3 is coming in multiple lines, and i want to make it in a single line.

3
  • 2
    can you show your current html Commented Sep 28, 2013 at 13:59
  • As Optimus mentions there are many reasons this could be happening, without some sample HTML it would be impossible to determine the cause. Commented Sep 28, 2013 at 14:05
  • Hi i added my code snippet here, please check this once. Commented Oct 5, 2013 at 11:37

1 Answer 1

1

jsFiddle

HTML

<div class="ques">Is it an animal?</div><div class="cb"><input type ="checkbox" value="yes" /></div>
<div class="ques">Is it an mineral?</div><div class="cb"><input type ="checkbox" value="yes" /></div>
<div class="ques">Is it an vegetable?</div><div class="cb"><input type ="checkbox" value="yes" /></div>
<div class="ques">Is it an fruit?</div><div class="cb"><input type ="checkbox" value="yes" /></div>
<div class="ques">Is it man-made?</div><div class="cb"><input type ="checkbox" value="yes" /></div>

CSS

.ques {width:66%;display:inline;float:left;}
.cb {width:33%;display:inline;float:left;}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.