DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Form Input Layout Css

11.30.2006
| 7562 views |
  • submit to reddit
        // description of your code here

label
{
    width:250px;
    float:left;
    clear:both;
}
            <form action="contact.php" method="POST">
                <ul id="contact">
                    <li>
                        <label for="name">Name:</label>
                        <input type="text" name="name" />
                    </li>
                    <li>

                        <label for="email">Email:</label>
                        <input type="text" name="email" />
                    </li>
                    <li>
                        <label for="message">Message:</label>
                        <textarea name="message"></textarea>
                    </li>

                    <li>
                        <input type="Submit" name="send" value="Send" />
                    </li>
                </ul>
            </form>