• Hello,
    I am trying to change the style of the theme using the style.css of the child theme i downloaded from your site.
    Though there are many rules that need !important in order to change, even ones that don’t have !important in the main style.css.
    Is there any other way?
    With the custom css in the wordpress dashboard happens the same thing.
    Thank you

Viewing 1 replies (of 1 total)
  • css is read line by line. so if a style for an element is declared on line 1 and then the same style is declared again on line 5 with a different value. the latter will take precedence.

    an inline style (a style written inline with the element) will take precedence over what is in the style sheet. no matter the order.

    and !important is the final say, so to speak. it will override css and inline styles no matter where it is located, unless another style has !important too.

    having to use !important, even on things that don’t have it in the style might be an indicator that the style you are trying to change is an inline style.

Viewing 1 replies (of 1 total)

The topic ‘child theme css need !importat’ is closed to new replies.