c# - How to move items to left inside a div? -


i have label,checkboxlist , datagridview within div. have used inline css move items left. doesn't work expect. how can move them? want 3 items in row. below have added aspx code.

<div id="div2" style="width:100%; height:auto; margin-top:30px">          <div id="div21" style="width: 50%; height:auto">              <div id="div211" style=" width:15%; height:auto">                  <asp:label id="lblkpi" text="kpi :" runat="server" style="margin-top:10px; margin-left:20px">                  </asp:label>              </div>              <div id="div212" style=" width:60%; height:auto; float:left">                  <asp:checkboxlist id="chklstkpi" style="width:auto; height:auto" runat="server">                  </asp:checkboxlist>              </div>                                           </div>                                      <asp:gridview id="gridview1" runat="server" style="float:left">                        </asp:gridview>            </div>

you need wrap gridview in div , set float:left div. inner div needs have float:left well.

try below html

<div id="div2" style="width:100%; height:auto; margin-top:30px">         <div id="div21" style="width: 50%; height:auto;float:left">             <div id="div211" style=" width:15%; height:auto;float:left">                 <asp:label id="lblkpi" text="kpi :" runat="server" style="margin-top:10px; margin-left:20px">                 </asp:label>             </div>             <div id="div212" style=" width:60%; height:auto; float:left">                 <asp:checkboxlist id="chklstkpi" style="width:auto; height:auto" runat="server">                 </asp:checkboxlist>             </div>                                          </div>                  <div  style="float:left;width:45%">           <asp:gridview id="gridview1" runat="server">             <columns>                 <asp:templatefield headertext="sometext">                  </asp:templatefield>             </columns>         </asp:gridview>     </div>     </div> 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -