How to Change the Color of a Drop Down List
- 1). Open a web page document in an HTML or text editor. To open a web page document using your default text editor, right-click the document, then click "Open With." Click to select "Notepad" or "WordPad," then click "OK."
- 2). Click to place your cursor on a blank line between the "<form>" and "</form>" tags that constitute the beginning and end of your website form. If you do not want to create the drop-down list as part of an online form, click to place your cursor on a blank line between the "<body>" and "</body>" tags, at a point in the web page document where you want to create the drop-down list.
- 3). Type "<select size='1' style='background-color:[ColorValue];'>" and press "Enter" to open the drop-down list tag. Replace the "[ColorValue]" text in the "background-color" property with a hexadecimal color value, such as "#ffffff" for white or "#ff0000" for red. This will change the background color value for the entire drop-down list, but this value can be overridden by specifying a background color value for an individual option in the drop-down list.
- 4). Type "<option value='[OptionValue]' style='background-color:[ColorValue];'>Option Value</option>" and press "Enter" to create an option value. Replace the "[OptionValue]" text with the option value, which is a unique form value that will be used when processing the form. Replace the "[ColorValue]" text with a hexadecimal color value to change the background color of only this option.
- 5). Repeat the previous step to create additional options in the drop-down list. Each option can be set to use a different background color. Any options without a defined background color will revert to the background color defined in the "<select>" tag in Step 3.
- 6). Type "</select>" to close the drop-down list tag.
- 7). Click the "File" menu in your HTML or text editor, then click "Save."
Source...