Jump to content

7.0 CSS for bg colour change on drop down within body of page?

Recommended Posts

Posted

Hey All,

Anyone have any idea of the CSS to change the bg or text colour on this interior drop down, please? 

www.latechnique.ca


Here is the original (awesome) code ofr the interior drop down found on this forum:

<select id="archive-pages" onchange="window.open ( this.value, '_self' );">

  <option value="#">
  
    Jump to Section
    
    </option>
    
  <option value="https://latechnique.ca/luteal/#ADS-lut">

    Adrenal Support
    
    </option>
  
  <option value="https://latechnique.ca/luteal/#Body-lut">
  
    Body
    
    </option>
    
  <option value="https://latechnique.ca/luteal/#Brain-lut">
  
    Brain
    
    </option>
   
  </select>

Screenshot 2023-11-12 115044.png

Screenshot 2023-11-12 115035.png

Posted

@KikiGood Unfortunately not, as this hover behavior is a browser default and not controlled by CSS... there are some hacks for it, but it's not a super-clean solution, as behavior can vary based on browsers. See references here: 

https://www.jotform.com/answers/2639917-i-want-to-change-the-highlight-color-inside-a-dropdown-menu 

https://stackoverflow.com/questions/19388011/how-to-change-colour-of-blue-highlight-on-select-box-dropdown

I tested some of their suggestions and didn't have much luck, sorry.

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.