Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends

I want to know how to allign < div > tags according to the content of the design page ? and give me some example code,links.

I want to design a table format inside the < div > but I am not getting proper allignment I used div width to 100% also and float:left also but something is missing...

Guide Me...


Thanks
Vikyas
Posted
Updated 1-Sep-14 23:06pm
v2
Comments
Thanks7872 2-Sep-14 5:31am    
Designing is something which has to be resolved solely by you. No one can assume which css rules is affecting the elements.
Akshay Raut 2-Sep-14 5:57am    
I posted my simple answer that works properly, and if you find it working too, kindly mark it as right solution. Thanks in advance.

1 solution

Try
HTML
<style type="text/css">

.header
{
    width:100%;
    background-color:Teal;
}
.left
{
    width:50%;
    background-color:Aqua;
    float:left;
}

.right
{
    width:50%;
    background-color:Silver;
    float:left;
}
</style>

<div class="header">
    Head section
    </div>
    <div class="left">
    Left
    </div>
    <div class="right">
    Right
    </div>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900