I have got a task to create the code for aligning the text boxes. I have a main div.Inside that I have so many sub div. These sub div is not properly aligned.I want to align these div by using jquery without editing the sub div.How can I do this? My code is
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Jquery-Align</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(function() {
$("#tabs").tabs();
});
});//]]>
</script>
</head>
<body>
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nithin</a> </li>
<li><a href="#tabs-2">Vipin</a></li>
</ul>
<div id="tabs-1">
<div id="maindiv">
<div>
<label>Name:</label>
<input type="text" name="name" value=""/>
</div>
<div>
<label>Age:</label>
<input type="text" name="name" value=""/>
</div>
<div>
<label>Email:</label>
<input type="text" name="name" value=""/>
</div>
<div>
<label>Phone:</label>
<input type="text" name="name" value=""/>
</div>
</div>
</div>
<div id="tabs-2">
<p>Vipin</p>
</div>
</div>
</body>
</html>
You can see my code on http://jsfiddle.net/CG6Vw/