Need help on HTML5 Form

Hi Experts,

I am newbie to web design and need help on designing a page using HTML5 .I have attached a form to this question and need sample working code for this using HTML5 with similar alignment and layout (Please see comments in the attached screenshot)

Thanks in Advance
html5form.png
ksd123Asked:
Who is Participating?
 
Scott Fell, EE MVEConnect With a Mentor DeveloperCommented:
http://jsbin.com/padasQ_28350882/3/

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
 <style>
   .container{width:900px;}
label{display:block;width:30%;float:left;}
.row{margin-bottom:10px;}
.box{border-color:black;border-style:solid;padding-left:20px;padding-right:20px;padding-top:5px;padding-bottom:20px;overflow: hidden;}
.rounded{border-radius:15px;}
h2{font-size:90%;margin-top:1%}
.col_sm{width:30%;float:left;}
.col_lg{width:60%;;float:left;}
   input{width:75px;}
   select{width:80px;}
  </style>
</head>
<body>
  <div class="container">
  <form>
    <div class="row">
      <label for "activity">Activity</label>
      <select id="activity" name="activity">
        <option value="1">One</option>
        <option value="2">two</option>
        <option value="3">three</option>
      </select>
      
    </div>
      <div class="row">
        <label for "name">Name</label>
        <input id="name" name="name">
      </div>
    
  </form>
  <div class="row box rounded">
    <h2>Project Status</h2>
     <div class="col_sm">Proj1</div>
    <div class="col_lg">Proj data</div>  
    <div class="col_sm">Proj2</div>
    <div class="col_lg">Proj data</div> 
  </div>
  <div class="row box rounded">
    <h2>Subject Status</h2>
    <div class="col_sm">subj1</div>
    <div class="col_lg">subj datasubj datasubj datasubj datasubj datasubj datasubj data</div>  
    <div class="col_sm">subj2</div>
    <div class="col_lg">subj data</div> 
  </div>
  </div>
  
</body>
</html>

Open in new window

I would suggest spending a few hours on html and css basics if you are going to do this on a regular basis.  It will save you  a ton of time and headeachs down the road.  http://www.codecademy.com/learn
0
 
Scott Fell, EE MVEDeveloperCommented:
Let me know if you need help understanding this.    

http://jsbin.com/padasQ_28350882/1/edit?html,output

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
 <style>
   
label{display:block;width:30%;float:left;}
.row{margin-bottom:10px;}
.box{border-color:black;border-style:solid;padding-left:20px;padding-right:20px;padding-top:5px;padding-bottom:20px;overflow: hidden;}
.rounded{border-radius:15px;}
h2{font-size:90%;margin-top:1%}
.col_sm{width:30%;float:left;}
.col_lg{width:60%;;float:left;}
  </style>
</head>
<body>
  <form>
    <div class="row">
      <label for "activity">Activity</label>
      <select id="activity" name="activity">
        <option value="1">One</option>
        <option value="2">two</option>
        <option value="3">three</option>
      </select>
      
    </div>
      <div class="row">
        <label for "name">Name</label>
        <input id="name" name="name">
      </div>
    
  </form>
  <div class="row box rounded">
    <h2>Project Status</h2>
     <div class="col_sm">Proj1</div>
    <div class="col_lg">Proj data</div>  
    <div class="col_sm">Proj2</div>
    <div class="col_lg">Proj data</div> 
  </div>
  <div class="row box rounded">
    <h2>Subject Status</h2>
    <div class="col_sm">subj1</div>
    <div class="col_lg">subj datasubj datasubj datasubj datasubj datasubj datasubj data</div>  
    <div class="col_sm">subj2</div>
    <div class="col_lg">subj data</div> 
  </div>
  
  
</body>
</html>

Open in new window

0
 
ksd123Author Commented:
Thank you for the quick turn around.

I was told not to use bootstrap  so I need above code without using bootstrap classes.

The other important thing I was told is the page layout should not be  responsive design ie.when I minimize/maximize the page  the textboxes / dropdowns / rounded tables etc. width /height should not shrink /grow with the screen size they all should have  fixed size.  

Thanks once again.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Scott Fell, EE MVEDeveloperCommented:
Bootstrap is not used here.  Just change the width's from % to px if you want it fixed.
0
 
ksd123Author Commented:
I am still confused .What are these classes row box rounded,col-sm,col-lg,row in Div's? where we have defined these classes? and also when I change the widht from % to px the page layout is messed up and not looking  good.
0
 
Scott Fell, EE MVEDeveloperCommented:
I will make it easier, just wrap a container that is fixed

The container sets the width to 900px.  Make this whatever you want.
By making the label a block and floating it left, it will be similar to using div's and the label will be to the left of the input.

The row sets off another block and we give it a bit of a margin at the bottom to space things out.
the box class creates the border and we add some padding on the inside
the rounded class makes the corners round
the col_sm is similar to bootstrap but not the same (col_sm_12) and I simply made it 30% and floated left.
col_lg is 60 % and floating the 2 divs inside a block (row) creates the 2 columns.

Sample http://jsbin.com/padasQ_28350882/2/
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
 <style>
   .container{width:900px;}
label{display:block;width:30%;float:left;}
.row{margin-bottom:10px;}
.box{border-color:black;border-style:solid;padding-left:20px;padding-right:20px;padding-top:5px;padding-bottom:20px;overflow: hidden;}
.rounded{border-radius:15px;}
h2{font-size:90%;margin-top:1%}
.col_sm{width:30%;float:left;}
.col_lg{width:60%;;float:left;}
  </style>
</head>
<body>
  <div class="container">
  <form>
    <div class="row">
      <label for "activity">Activity</label>
      <select id="activity" name="activity">
        <option value="1">One</option>
        <option value="2">two</option>
        <option value="3">three</option>
      </select>
      
    </div>
      <div class="row">
        <label for "name">Name</label>
        <input id="name" name="name">
      </div>
    
  </form>
  <div class="row box rounded">
    <h2>Project Status</h2>
     <div class="col_sm">Proj1</div>
    <div class="col_lg">Proj data</div>  
    <div class="col_sm">Proj2</div>
    <div class="col_lg">Proj data</div> 
  </div>
  <div class="row box rounded">
    <h2>Subject Status</h2>
    <div class="col_sm">subj1</div>
    <div class="col_lg">subj datasubj datasubj datasubj datasubj datasubj datasubj data</div>  
    <div class="col_sm">subj2</div>
    <div class="col_lg">subj data</div> 
  </div>
  </div>
  
</body>
</html>

Open in new window

0
 
ksd123Author Commented:
Thank you so much. Just  I want the (Activity) dropdown width to be equal with (Name) textbox width.Now the dropdown width is very small compared to textbox width.
0
 
ksd123Author Commented:
Thank you
0
All Courses

From novice to tech pro — start learning today.