HTML fieldset legend

Source: Internet
Author: User
  1. . Depot-form fieldset {
  2. Background: # efe;
  3. }
  4. . Depot-form legend {
  5. Color: # dfd;
  6. Background: #141;
  7. Font-family: sans-serif;
  8. Padding: 0.2em 1em;
  9. }
  10. . Depot-form label {
  11. Width: 5em;
  12. Float: left;
  13. Text-align: right;
  14. Margin-right: 0.5em;
  15. Display: block;
  16. }
  17. . Depot-form. submit {
  18. Margin-left: 5.5em;
  19. }

 

  1. <! --
  2. ! Excerpted from "Agile Web Development with Rails, 2nd Ed .",
  3. ! Published by The Pragmatic Bookshelf.
  4. ! Copyrights apply to this code. It may not be used to create training material,
  5. ! Courses, books, articles, and the like. Contact us if you are in doubt.
  6. ! We make no guarantees that this code is fit for any purpose.
  7. ! Visit http://www.pragmaticprogrammer.com/titles/rails2 for more book information.
  8. -->
  9. <Div class = "depot-form">
  10. <% = Error_messages_for 'user' %>
  11. <Fieldset>
  12. <Legend> Enter User Details </legend>
  13. <% Form_for: user do | form | %>
  14. <P>
  15. <Label for = "user_name"> Name: </label>
  16. <% = Form. text_field: name,: size => 40%>
  17. </P>
  18. <P>
  19. <Label for = "user_password"> Password: </label>
  20. <% = Form. password_field: password,: size => 40%>
  21. </P>
  22. <P>
  23. <Label for = "user_password_confirmation"> Confirm: </label>
  24. <% = Form. password_field: password_confirmation,: size => 40%>
  25. </P>
  26. <% = Submit_tag "Add User",: class => "submit" %>
  27. <% End %>
  28. </Fieldset>
  29. </Div>

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.