Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- .error {
- width: 13em; /* Ensures that the div won't exceed right padding of form */
- margin-top: -1.5em; /*Moves the div up to the same level as input */
- margin-left: 11em; /*Moves div to the right */
- font-size: .9em; /*Makes sure that the error div is smaller than input */
- }
- <form>
- <label for="name">Name:</label><input id="name" type="textbox" />
- <div class="error"><<< This field is required!</div>
- <label for="numb">Phone:</label><input id="numb" type="textbox" />
- <div class="error"><<< This field is required!</div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement