Friday, July 18, 2014

Creating the forms using div with table structure side by side:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
.genral .table { display: table; width: 100%; border:1px solid #ff0000; border-radius:10px; }
.genral .row {  display: table-row; }
.genral .cell { display: table-cell; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}
.cell-1-width{ width:300px;}
.cell-2-width{ width:20px;}
.text-field-css{ border:1px solid #cccccc; width:250px; border-radius:5px; height:22px; margin-bottom:20px; background-color:#FFFFFF; margin-top:5px;}
</style>
</head>
<body>
<div class="genral">
    <div class="table">
        <div class="row">
            <div class="cell cell-1-width">User Name<br /><input name="" type="text" class="text-field-css" /></div>
            <div class="cell">password<br /><input name="" type="text" class="text-field-css" /></div>
        </div>
       
        <div class="row">
            <div class="cell cell-1-width">User Name<br /><input name="" type="text" class="text-field-css" /></div>
            <div class="cell">password<br /><input name="" type="text" class="text-field-css" /></div>
        </div>
       
        <div class="row">
            <div class="cell cell-1-width">User Name<br /><input name="" type="text" class="text-field-css" /></div>
            <div class="cell">password<br /><input name="" type="text" class="text-field-css" /></div>
        </div>
       
        <div class="row">
            <div class="cell cell-1-width">User Name<br /><input name="" type="text" class="text-field-css" /></div>
            <div class="cell">password<br /><input name="" type="text" class="text-field-css" /></div>
        </div>
           
       
       
  <!--     /*  <div class="row">
            <div class="cell"><input name="Submit" type="button" value="Submit" /></div>
        </div>
        */
        -->
       
       
    </div>
</div>
</body>
</html>

No comments:

Post a Comment