SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Form Validation

  1. #1
    SitePoint Wizard mPeror's Avatar
    Join Date
    Mar 2005
    Location
    Saudi Arabia
    Posts
    1,724
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form Validation

    Do i have to wrap every form element and its label in a block-level element in order for the code to validate? If so, which element should i use? div?

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    <fieldset>

    And using only fieldset should suffice.

  3. #3
    SitePoint Wizard mPeror's Avatar
    Join Date
    Mar 2005
    Location
    Saudi Arabia
    Posts
    1,724
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So i shall do it with fieldset and hide the border with CSS, no?

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A FIELDSET is meant for grouping related controls together. A FIELDSET must have a LEGEND as its first child. Sometimes I prefer to use a DIV instead, if I don't want borders and a legend. Especially for containing things like buttons.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •