Click here to Skip to main content
15,845,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i have tried for some code and not worked-out for me,

i have 3 radio buttons which says Right,Center and Left

now i want to dived the page into two equal parts vertically ,

if the user selects the right radio button the table should be created on right-side of the page,if he selects left table should be created on left-side of the page,if the user selects the Center radio button the table should be created on Center of the page,


this should not be overlap at any condition


please help me out with this

thanku
Posted
Comments
Praveen Kumar Upadhyay 5-Jan-15 7:11am    
float="left"
float="right"
float="both"

Should work.
Praveen Kumar Upadhyay 5-Jan-15 8:31am    
Is this not working?
King Fisher 5-Jan-15 7:13am    
Asp.net ?
murkalkiran 5-Jan-15 7:14am    
yes using html
King Fisher 5-Jan-15 7:23am    
If you are working in Asp.net Please Tag your Question Properly .

Fiddle[^]
Please check the fiddle if this helps.
Done according to the need.
Please post back queries if any.
Thanks
 
Share this answer
 
Check this out: http://jsfiddle.net/vj9y7ozo/[^]
 
Share this answer
 
You can use table align property to set the table left ,right or center of the page

if you want to use CSS,

HTML
<table>
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>


To align center,

CSS
table{
  margin-left: auto;
  margin-right: auto;
}


To align left

CSS
table{
 position: absolute;
 left: 0px;
}


or

CSS
table{
 float: left;
}


To align right

CSS
table{
 position: absolute;
 right: 0px;
}


or

CSS
table{
 float: right;
}


To divide page into two vertical columns

HTML
<div style = "width=100%">
<div style= "float:left;width:50%;"></div>
<div style= "float:left;width:50%;"></div>
</div>
 
Share this answer
 
v2

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