<div id="leftdiv" style="float: left;">
Some Left Content
</div>
<div id="rightdiv" style="float: left;">
Some Right Content
</div>
<div style="clear: both"></div>
<p> Next Line "clear: both used to break into new line" </p>
"Some Right Content" which content will display on right next to the left content. But it not means right aligned text.
you can see the demo page http://www.codeel.com/demo/ here. so you can get clear vision. here padding is used to get some space between left and right contents
hazz
Member
22 Points
113 Posts
put a control to the right of another control. Table? css?
Jul 08, 2012 09:05 PM|LINK
for a simple layout for a webform, I want to have two controls side by side, below a header or simple content.
Do I lay that out with hml or css or ??
The works actually but I don't understand how the listbox shows up on the right.
<div id="menu" style="background-color:#FFD700;height:200px;width:100px;float:left;"> <b>Menu</b><br /> HTML<br /> CSS<br /> JavaScript</div> <div id="Div2" style="background-color:#EEEEEE;height:200px;width:400px;float:left;"> <asp:RadioButtonList ID="RadioButtonList1" runat="server"> <asp:ListItem>Item 1</asp:ListItem> <asp:ListItem>Item 2</asp:ListItem> <asp:ListItem>Item 3</asp:ListItem> <asp:ListItem>Item 4</asp:ListItem> <asp:ListItem>Item 5</asp:ListItem> <asp:ListItem>Item 6</asp:ListItem> </asp:RadioButtonList></div>Thank you,
Greg
Codeel
Member
40 Points
5 Posts
Re: put a control to the right of another control. Table? css?
Jul 08, 2012 09:22 PM|LINK
simple do like the code below
css
Web Design and Software Development Company
hazz
Member
22 Points
113 Posts
Re: put a control to the right of another control. Table? css?
Jul 08, 2012 09:29 PM|LINK
thank you. what in the syntax indicates that "Some Right Content" will actually be on the right?
css
Codeel
Member
40 Points
5 Posts
Re: put a control to the right of another control. Table? css?
Jul 08, 2012 09:56 PM|LINK
"Some Right Content" which content will display on right next to the left content. But it not means right aligned text.
you can see the demo page http://www.codeel.com/demo/ here. so you can get clear vision. here padding is used to get some space between left and right contents
mark as answer if it helpful
Web Design and Software Development Company
Codeel
Member
40 Points
5 Posts
Re: put a control to the right of another control. Table? css?
Jul 08, 2012 10:01 PM|LINK
If you need to display Div2 on the rightmost place then you have to use float: right instead of left like the page below
http://www.codeel.com/demo/index2.html
Web Design and Software Development Company