I have subsite page(home.aspx) which for some reason inherits the css from a script editor in default.aspx(parent page). I'm basically changing the color of home.aspx css webpart header, I want it to be red in the home.aspx page. For some reason the parent's page Script editor style overrwrites it.

how do i prevent this from happening. (note that this is when you edit page and create a script editor with style. Below are the screenshots:

enter image description here

below is the script: enter image description here

  • **note that if its still in edit mode, the red background color is okay, but if i exit out of the edit mode, it seems to get the bg color from the other page. Feb 27, 2017 at 2:31
  • Those who know CSS will cause you bodily harm if they see you use !important Because when it is applied it can no longer be undone by any other CSS rule in the page. Instead learn to apply CSS Specificity ; which is applied in OPs screenshot where you see .ms-Webpart-titleText used 2 times (in the first Selector) So if you apply the class a 3th time, you increase Specificity. Documentation: See: stuffandnonsense.co.uk/archives/css_specificity_wars.html Feb 27, 2017 at 8:39

1 Answer 1


You can specify like !important for the css style to over right and apply. See the below sample

 .ms-Webpart-titleText {
    font-size: 13px!impotant;

Please check and apply for your css script.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.