-2

I want to add "display: flex" to flexslider2 slides but the plugin's javascript sets the slides to "display: block" so I can't just declare that in my wp theme stylesheet because the javascript's style declarations take precedence over the stylesheet's. I can go in and change the lines of code in the flexslider.js that but then I run into the trouble of having those lines overwritten when the wordpress plugin gets updated. So, what's the best way to override javascript css? Should I even be using the flexslider plugin? Is there a better way to use jquery/js to create a slider that I can use flex properties on? It seemed the cleanest and easiest slider plugin to implement as a featured posts slider in wp. Thanks for your help.

user1574371
  • 75
  • 1
  • 1
  • 9

1 Answers1

0

You can override script style by adding the !important after the CSS prop. Example:

.flexslider2{
  display: flex !important;
}

Note: avoid the !important usage, because it can lead to unexpected CSS results.

Maxwell s.c
  • 1,583
  • 15
  • 29