Posted By

andyhartleeds on 09/18/07


Tagged

css forms label tableless span


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

jonhenshaw
bartekk
vali29
marteki
jeff
gAmUssA
satsuma


CSS tableless forms using labels and spans


 / Published in: CSS
 

For creating forms without using tables, just CSS.

  1. label {
  2. display: block;
  3. width: 125px;
  4. float: left;
  5. padding: 5px;
  6. margin: 2px;
  7. clear: both;
  8. text-align: left;
  9. }
  10.  
  11. span {
  12. display: block;
  13. margin: 3px;
  14. }
  15.  
  16. span * {
  17. margin: 0;
  18. }

Report this snippet  

You need to login to post a comment.