Style select options with CSS

To style the options in <select>, you can try to run the following code,


Live Demo

<!DOCTYPE html>
         select {
            width: 100%;
            padding: 10px 15px;
            border: 1px dashed blue;
            border-radius: 4px;
            background-color: orange;
         <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>

Updated on: 23-Jun-2020

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started