<style type="text/css">
#content{
width: 400px;
}
#right {
float: right;
}
#left {
float:left;
}
</style>
<div id="content">
<div id="right">
Your right content here
</div>
<div id="left">
Left content here
</div>
</div>
here is a small example i make in quick for you.
basically Div content contains 2 divs (right and left).Code:<style type="text/css"> #content{ width: 400px; } #right { float: right; } #left { float:left; } </style> <div id="content"> <div id="right"> Your right content here </div> <div id="left"> Left content here </div> </div>
you can set there margin etc in style.
<style type="text/css">
#content{
width: 400px;
border-top: 1px solid #CCC;
border-bottom: 1px solid #CCC;
min-height: 50px;
padding: 16px;
}
#right {
float: right;
border-left: 1px solid #CCC;
padding: 16px;
}
#left {
float:left;
padding: 18px;
}
</style>
<div id="content">
<div id="right">
Your right content here
</div>
<div id="left">
Left content here
</div>
</div>
<div style="text-align:center;">move text to center</div>
<div style="text-align:left;">move text to left</div>
<div style="text-align:right;">move text to right</div>
you can add that part in your css or leave in html with style attribute.
For lines you can add borders, here is a quick way but you need to adjust your min-height according to your content. there is some other way you can check here
http://www.webtoolkit.info/css-clearfix.html
Below example will add quick dirty borders
Code:<style type="text/css"> #content{ width: 400px; border-top: 1px solid #CCC; border-bottom: 1px solid #CCC; min-height: 50px; padding: 16px; } #right { float: right; border-left: 1px solid #CCC; padding: 16px; } #left { float:left; padding: 18px; } </style> <div id="content"> <div id="right"> Your right content here </div> <div id="left"> Left content here </div> </div>
with float like someone already explained to you above or:
don't know for what you need it.Code:<div style="text-align:center;">move text to center</div> <div style="text-align:left;">move text to left</div> <div style="text-align:right;">move text to right</div>
<div id="left" style="width:50%;float:left;background:green;">left</div>
<div id="right" style="margin-left:50%;border-left:solid 1px black;background:red;">right</div>