• Resolved DannyG

    (@dannygarcia1971)


    Hi!

    Trying to change the font size in a particular table with a custom CSS using your plugin, but the font size remains the same.

    Looks like the CSS of the theme I use overrides my custom CSS rule.

    I have just tried the same custom CSS rule on a test website with default WordPress theme and the CSS worked, but it’s not working in my theme.

    How can I resolve this issue?

Viewing 1 replies (of 1 total)
  • Plugin Author SilkyPress

    (@diana_burduja)

    Hello Danny,

    in CSS a selector with a higher specificity will have a higher priority, so it will not overridden by the theme’s CSS rules for the same element.

    The same table can be targeted by different selectors. The following selectors are ordered by their specificity from low to high:
    table
    table.my-table-class
    table.my-table-class.my-table-second-class
    table#my-table-id
    table#my-table-id.my-table-class
    .parent-class table#my-table-id.my-table-class

    See this article about CSS selectors’ specificity.

    Alternatively, you can use the “!important” directive at the end of your CSS declaration. For example:

    table.my-table-class {
        font-size: 2em !important;
    }
Viewing 1 replies (of 1 total)

The topic ‘CSS override issue’ is closed to new replies.