CSS tableless forms using labels and spans


/ Published in: CSS
Save to your folder(s)

For creating forms without using tables, just CSS.


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.