Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Style select options with CSS
To style the options in <select>, you can try to run the following code,
Example
<!DOCTYPE html>
<html>
<head>
<style>
select {
width: 100%;
padding: 10px 15px;
border: 1px dashed blue;
border-radius: 4px;
background-color: orange;
}
</style>
</head>
<body>
<p>Learn,</p>
<form>
<select id = "country" name = "country">
<option value = "java">Java</option>
<option value = "ruby">Ruby</option>
<option value = "oracle">Oracle</option>
<option value = "tableau">Tableau</option>
</select>
</form>
</body>
</html> Advertisements
