Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form>
- <div>
- <label for="balloons">Number of balloons to order (multiples of 10):</label>
- <input id="balloons" type="number" name="balloons" step="10" min="0" max="100" required>
- <span class="validity"></span>
- </div>
- <div>
- <input type="submit">
- </div>
- </form>
- </style>
- div {
- margin-bottom: 10px;
- position: relative;
- }
- input[type="number"] {
- width: 100px;
- }
- input + span {
- padding-right: 30px;
- }
- input:invalid+span:after {
- position: absolute;
- content: '✖';
- padding-left: 5px;
- }
- input:valid+span:after {
- position: absolute;
- content: '✓';
- padding-left: 5px;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement