WEB form question(s)

Discussion in 'OT Technology' started by Yuppy, Feb 11, 2008.

  1. Yuppy

    Yuppy Have a seat right there....

    Joined:
    Jan 7, 2007
    Messages:
    12,589
    Likes Received:
    0
    Location:
    THE Hawkeye Nation
    anyway I am awful at forms.... I've always struggled with them in the past.

    Anyway, I want the results to be submitted to me

    I want these in it, Basically a simple form.



    Anyway, is there a new way w/css to do this or is it just the standard html form?

    my biggest trouble has always been submit buttons.



    (Im trying pathetically to design www.yourcityforums.com right now)

    basically Im applying what I learn in the book as I go to the site, just so i can get the jyst of it and get a real world application....
     
  2. Necromancer

    Necromancer Guest

    javascript.
     
  3. GotVtec

    GotVtec 8th World Wonder

    Joined:
    Mar 14, 2000
    Messages:
    575
    Likes Received:
    0
    Location:
    Omaha, NE
    Code:
    <style type="text/css">
    
    .cssform p{
    width: 300px;
    clear: left;
    margin: 0;
    padding: 5px 0 8px 0;
    padding-left: 155px; /*width of left column containing the label elements*/
    border-top: 1px dashed gray;
    height: 1%;
    }
    
    .cssform label{
    font-weight: bold;
    float: left;
    margin-left: -155px; /*width of left column*/
    width: 150px; /*width of labels. Should be smaller than left column (155px) to create some right margin*/
    }
    
    .cssform input[type="text"]{ /*width of text boxes. IE6 does not understand this attribute*/
    width: 180px;
    }
    
    .cssform textarea{
    width: 250px;
    height: 150px;
    }
    
    /*.threepxfix class below:
    Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents.
    to account for 3 pixel bug: http://www.positioniseverything.net/explorer/threepxtest.html
    */
    
    * html .threepxfix{
    margin-left: 3px;
    }
    
    </style>
    Code:
    <form id="myform" class="cssform" action="">
    
    <p>
    <label for="user">Name</label>
    <input type="text" id="user" value="" />
    </p>
    
    <p>
    <label for="emailaddress">Email Address:</label>
    <input type="text" id="emailaddress" value="" />
    </p>
    
    <p>
    <label for="comments">Feedback:</label>
    <textarea id="comments" rows="5" cols="25"></textarea>
    </p>
    
    <p>
    <label for="comments">Sex:</label>
    Male: <input type="radio" name="sex" /> Female: <input type="radio" name="sex" /><br />
    </p>
    
    <p>
    <label for="comments">Hobbies:</label>
    <input type="checkbox" name="hobby" /> Tennis<br />
    <input type="checkbox" name="hobby" class="threepxfix" /> Reading <br />
    <input type="checkbox" name="hobby" class="threepxfix" /> Basketball <br />
    </p>
    
    <p>
    <label for="terms">Agree to Terms?</label>
    <input type="checkbox" id="terms" class="boxes" />
    </p>
    
    <div style="margin-left: 150px;">
    <input type="submit" value="Submit" /> <input type="reset" value="reset" />
    </div>
    
    </form>
     
  4. Yuppy

    Yuppy Have a seat right there....

    Joined:
    Jan 7, 2007
    Messages:
    12,589
    Likes Received:
    0
    Location:
    THE Hawkeye Nation
    java eh? yea I figured.... not that far in the book yet :-(
     
  5. Yuppy

    Yuppy Have a seat right there....

    Joined:
    Jan 7, 2007
    Messages:
    12,589
    Likes Received:
    0
    Location:
    THE Hawkeye Nation
    govtec, you are fast!! lol ty
     
  6. GotVtec

    GotVtec 8th World Wonder

    Joined:
    Mar 14, 2000
    Messages:
    575
    Likes Received:
    0
    Location:
    Omaha, NE
    I have a million snippets of code on my HDD.
     
  7. Necromancer

    Necromancer Guest

    I figured you had some reference database.
     
  8. Yuppy

    Yuppy Have a seat right there....

    Joined:
    Jan 7, 2007
    Messages:
    12,589
    Likes Received:
    0
    Location:
    THE Hawkeye Nation
    id love that torrent. ;-p
     

Share This Page