Hi 

I recently moved a form from table layout to css/form control markup. Lot more 
maintable than
farting around with colspans and rowspans etc etc.


Here's a code snippet


          <div class="formfield">
          <label accesskey="m" for="mailbox">Mailbox</label>
          <input class="textfield" name="mailbox" type="text" id="mailbox" value="" />
          </div>

          <div class="formfield">
          <label accesskey="s" for="mailserver">Mail Server</label>
             <input class="textfield" name="mailserver" type="text" id="mailserver"
value="mail.blah.net" />
          </div>

          
          <div class="formfield">
          <label accesskey="p" for="password">Email Password</label>
          <input class="textfield" name="password" type="password" id="password" />
          </div>


CSS :
/** form input fields **/
LABEL
{
 padding : 2px;
 margin : 3px 1px 3px 1px;
 border : none;
 display : block;
 width  : 100px;
 text-align : right;
 float : left;
}

.formfield
{
 text-align : left;
 padding : 2px;
 margin : 0px 1px 0px 1px;
 width : 300px;
}

.textfield
{
 border: 1px solid #999;
 background-color: #ededed;
 color : #333;
 padding : 2px;
 margin : 3px 4px 3px 0px;
 width : 150px;
}

James Ellis
www.webqs.com
---
WSG - http://webstandardsgroup.org | Web Standards Group
syd::php - http://sydney.ug.php.net | Sydney PHP Developers
---
#300 - http://www.sitepoint.com/articlelist/300
---

*****************************************************
The discussion list for http://webstandardsgroup.org/
***************************************************** 

Reply via email to