Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Consider this article titled <a href="http://www.cssdrive.com/index.php/examples/exampleitem/tableless_forms/" rel="noreferrer">Tableless forms using CSS</a> from CssDrive.</p> <p>A little bit of style really helps. I've been refactoring/replacing all my table'd forms with the pattern found in the article above.</p> <p>With the following code:</p> <ul> <li>asp:textbox works perfectly, needs no modification for all kinds of textboxes</li> <li>asp:button works perfectly, needs no modification</li> <li>asp:checkbox would likely need modification, perhaps wrapped in another div with a special style</li> </ul> <p><img src="https://imgur.com/SYtAG.png" alt="http://imgur.com/SYtAG.png"></p> <p>Here's the basic example presented:</p> <p><strong>The CSS:</strong></p> <pre><code>&lt;style type="text/css"&gt; label{ float: left; width: 120px; font-weight: bold; } input, textarea{ width: 180px; margin-bottom: 5px; } textarea{ width: 250px; height: 150px; } .boxes{ width: 1em; } #submitbutton{ margin-left: 120px; margin-top: 5px; width: 90px; } br{ clear: left; } &lt;/style&gt; </code></pre> <p><strong>The HTML:</strong></p> <pre><code>&lt;form&gt; &lt;label for="user"&gt;Name&lt;/label&gt; &lt;input type="text" name="user" value="" /&gt;&lt;br /&gt; &lt;label for="emailaddress"&gt;Email Address:&lt;/label&gt; &lt;input type="text" name="emailaddress" value="" /&gt;&lt;br /&gt; &lt;label for="comments"&gt;Comments:&lt;/label&gt; &lt;textarea name="comments"&gt;&lt;/textarea&gt;&lt;br /&gt; &lt;label for="terms"&gt;Agree to Terms?&lt;/label&gt; &lt;input type="checkbox" name="terms" class="boxes" /&gt;&lt;br /&gt; &lt;input type="submit" name="submitbutton" id="submitbutton" value="Submit" /&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload