Monday 27 August 2012

HTML Forms: Using "div" tag instead of "table" tag

2 comments




Name:
Age:
Shoe size:
Comments:



The CSS looks like this:      



div.row {
  clear: both;
  padding-top: 5px;
  }

div.row span.label {
  float: left;
  width: 100px;
  text-align: right;
  }

div.row span.formw {
  float: right;
  width: 235px;
  text-align: left;
  } 
div.spacer {
  clear: both;
  }







The HTML looks like this:




<div style="width: 360px; background-color: #ccc;
border: 1px dotted #333; padding: 5px;
margin: 0px auto;">
  <form>
    <div class="row">
      <span class="label">Name:</span>
      <span class="formw"><input type="text" size="25" /></span>
    </div>

    <div class="row">
      <span class="label">Age:</span>
      <span class="formw"><input type="text" size="25" /></span>
    </div>

    <div class="row">
      <span class="label">Shoe size:</span>
      <span class="formw"><input type="text" size="25" /></span>
    </div>

    <div class="row">
      <span class="label">Comments:</span>
      <span class="formw">
        <textarea cols="25" rows="8">
        Go ahead - write something...
        </textarea>
      </span>
    </div>

  <div class="spacer">
  &nbsp;
  </div>
 </form>

</div>




2 Responses so far

  1. Thanks, I am using this knowledge for my blogspot. Submarine Cable in Bangladesh, The second submarine station on Sunday 17 Sep 2017, which was inaugurated in Kuakata, has a capacity of 1500 Gbps. It is five times more powerful than Cox’s Bazar.

  2. Unknown says:

    Html Forms: Using "Div" Tag Instead Of "Table" Tag >>>>> Download Now

    >>>>> Download Full

    Html Forms: Using "Div" Tag Instead Of "Table" Tag >>>>> Download LINK

    >>>>> Download Now

    Html Forms: Using "Div" Tag Instead Of "Table" Tag >>>>> Download Full

    >>>>> Download LINK

Leave a Reply