Dependency field styles not working ~ Fix given

Dependency field styles not working ~ Fix given

Usecase

Applying bootstrap / some other css libraries for Visualforce page doesn't help you in styling Dependency Picklist fields

Example Screenshot

NOTE: Even writing inline styles cant help you here

Solution

As discussed earlier css Libraries/ Inline css/ External css cant fix this problem.

In order to fix this you need write styles at Select tag level under <Style> tgas as shown

select {
    width: 100 % ;
    height: 25 px;
    background-color: white;
}

Output

Happy coding! Comment below for additional help

Subscribe to Phanindra Mangipudi

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe