Page 1 of 1

Manufacturers Dropdown and CSS Colour

Posted: Thu Nov 11, 2021 2:21 am
by Dnj1964
Had this dropdown in colour and now back to original.

Looking at /includes/modules/boxes/templates/tpl_bm_manufacturers.php

Code: Select all

// Display a drop-down
    $manufacturers = array_merge(
      [['id' => '', 'text' => PULL_DOWN_DEFAULT]],
      $GLOBALS['db']->fetch_all($manufacturers_query));
    $menu = new Select('manufacturers_id', $manufacturers, ['onchange' => 'this.form.submit();', '[b]class' => 'custom-form-input w-100[/b]']);
    if (isset($_GET['manufacturers_id'])) {
      $menu->set_selection($_GET['manufacturers_id']);
    }
?>
  <ul [b]class="list-group list-group-flush[/b]">
    <li [b]class="list-group-item[/b]">
      <?= (new Form('manufacturers', $GLOBALS['Linker']->build('index.php', [], false), 'get'))->hide_session_id() ?>
        <?= $menu ?>
      </form>
    </li>
  </ul>
      
Can't find which class to use to change the font color and weight and background color of the drop down.

Re: Manufacturers Dropdown and CSS Colour

Posted: Thu Nov 11, 2021 2:39 am
by ecartz
Dnj1964 wrote: Thu Nov 11, 2021 2:21 am Had this dropdown in colour and now back to original.
What was working previously? I.e. how did you make it color before it stopped working?

Re: Manufacturers Dropdown and CSS Colour

Posted: Thu Nov 11, 2021 3:04 am
by Dnj1964
ecartz wrote: Thu Nov 11, 2021 2:39 am
Dnj1964 wrote: Thu Nov 11, 2021 2:21 am Had this dropdown in colour and now back to original.
What was working previously? I.e. how did you make it color before it stopped working?
The drop down was in colour.

I used user.css to override the colour, weight, and background.

Not sure which

I have tried:

Code: Select all

.list-group-flush {
                  font-weight: 800;
                  line-height: 1.5;
                  color: #B62285;
                  background-color: #FDE6FD;
                  }


.custom-form-input w-100 {
                         font-weight: 800;
                         line-height: 1.5;
                         color: #B62285;
                         background-color: #FDE6FD;
                         }
                         
 .card
 
.bm-manufacturers
                         
Nothing changes the colour of the manufacturers dropdown

Re: Manufacturers Dropdown and CSS Colour

Posted: Thu Nov 11, 2021 7:34 am
by ecartz
It seems to work for me with

Code: Select all

SELECT.custom-form-input {
  color: #B62285;
  background-color: #FDE6FD;
}
Pink_drop_down.png
I don't think that you can do two CSS classes the way you have it. I added the SELECT to limit it further, but you don't have to if you don't need it. I left out the other two lines because they weren't necessary to change the color. It still works with them added, but I didn't feel like taking another screenshot.

Re: Manufacturers Dropdown and CSS Colour

Posted: Fri Nov 12, 2021 5:44 pm
by Dnj1964
ecartz wrote: Thu Nov 11, 2021 7:34 am It seems to work for me with

Code: Select all

SELECT.custom-form-input {
  color: #B62285;
  background-color: #FDE6FD;
}
Pink_drop_down.png
I don't think that you can do two CSS classes the way you have it. I added the SELECT to limit it further, but you don't have to if you don't need it. I left out the other two lines because they weren't necessary to change the color. It still works with them added, but I didn't feel like taking another screenshot.
Thanks for taking the time to help, greatly appreciated.

I used the code below and it works perfectly.

Code: Select all

.custom-form-input {
                                   font-weight: 800;
                                   line-height: 1.5;
                                   color: #B62285;
                                   background-color: #FDE6FD;
                                   }