2

In a .net aspx web project I am struggling to get the alignment correct in a checkboxlist. My checkboxlist is set to display the text on the left and the checkboxes on the right. I would like have the check boxes aligned equally under each other.

The checkboxlist is populated from a sql database.

The markup for the checkboxlist is currently:

 <asp:CheckBoxList ID="CheckBoxList1" runat="server" TextAlign="Left" Width="1121px" CellSpacing="10" DataMember="DefaultView" DataSourceID="SqlDataSource1" DataTextField="ProductIdName" DataValueField="ProductIdName" Height="29px" OnDataBound="CheckBoxList1_DataBound"></asp:CheckBoxList>

Layout issue

I have tried This Link

Community
  • 1
  • 1
Christo
  • 411
  • 7
  • 27

1 Answers1

0

You'd better post your code so we can easily help you! According to what you need to achieve, here's a quick tip

 <style>
 .left{float:left;width:86%}
 .right{float:right;width:10%}
 .clear{clear:both}
 </style>
 <div>
      <div class='left'><label for='checkOne'>Chosen One</label></div>
      <div class='right'><input id='checkOne' type='checkbox'/></div>
      <div class='clear'></div>
      <div class='left'><label for='checkTwo'>Chosen Two</label></div>
      <div class='right'><input id='checkTwo' type='checkbox'/></div>
      <div class='clear'></div>
 </div>
Bellash
  • 7,560
  • 6
  • 53
  • 86