So my problem is that I want to use a custom css which I have included in my masterpage. The thing is that I don't want it ti be active when I'm in all the "_layouts/"-pages i.e "site settings".

My idé was to use javascript for this and check if the Url contains "_layouts" and then use the default CSS from seattle masterpage.

But I'm not really happy with that approach so I want to ask you guys if there are a better way? This must be a pretty common problem or no?

1 Answer 1


There are 2 properties that a site/web has. CustomMasterPage and MasterPage. If you set the CustomMasterPage url and not the master page all pages that are not for the admin, they will use your master page but the rest will use the out of the box one.

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.