
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Style <input> elements with a value outside a specified range with CSS
Use the CSS :out-of-range selector to style <input> elements with a value outside a specified range.
Example
You can try to run the following code to implement the :out-of-range selector:
<!DOCTYPE html> <html> <head> <style> input:out-of-range { border: 3px dashed orange; background: yellow; } </style> </head> <body> <input type = "number" min = "5" max = "10" value = "15"> <p>The style only works for the value entered out of range</p> </body> </html>
- Related Questions & Answers
- Style <input> elements with a value within a specified range with CSS
- Style all <input> elements with a valid value with CSS
- Style all <input> elements with an invalid value with CSS
- Style <input> elements with a "readonly" attribute with CSS
- Style <input> elements with a "required" attribute with CSS
- Style every checked <input> element with CSS
- Style every disabled <input> element with CSS
- Style every enabled <input> element with CSS
- Style every <p> element with a lang attribute value with CSS
- Style <input> element with no "required" attribute with CSS
- Style <input> element with no "readonly" attribute with CSS
- Working with <style> element for CSS
- Selects all <p> elements inside <div> elements with CSS
- Select elements whose attribute value ends with a specified value with CSS
- Select elements whose attribute value begins with a specified value with CSS
Advertisements