Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Color Options for Select

BeldenSpartan free asked 3 years ago


My page has a black background, and I'd like to change the colors (text color, background color, icon color, etc.) of the 'select' item to properly show on the page. How do I do this in CSS? I've searched quite a bit and can't seem to find anything that works. Here's the HTML:

<div class="col col-lg-2">  
            <select class="select" data-mdb-filter="true" name="c1", id="c1">
                <option value="Option1" selected="selected" >Option1</option>
                <option value="Option2">Option2</option>
                <option value="Option3">Option3</option>
                <option value="Option4">Option4</option>
                <option value="Option5">Option5</option>
            </select>                
        </div>

Michał Duszak staff answered 3 years ago


For text:

.select-input {
  color: black;
}

For background of not disabled input area:

.select-input.form-control[readonly]:not([disabled]) {
  background: white;
}

For select arrow:

.select-arrow {
  color: red;
}

https://mdbootstrap.com/snippets/standard/m-duszak/3335982#css-tab-view



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No