Search code examples
sharepointsharepoint-2013master-pagessharepoint-designersharepoint-online

How to add custom Stylesheet before Corev15.css in SharePoint Custom HTML Master Page?


I have created a custom HTML Master Page, it's working fine, but I need to Add the custom Stylesheet Before Loading the corev15.css

I have added the code like below

 <link href="/Style Library/Branding/css/ABCLeagueOpertaionCustom.css" type="text/css" rel="stylesheet" />
<link href="/_layouts/15/1033/styles/Themable/corev15.css" rel="stylesheet" type="text/css" />

But It's render look like below. enter image description here

Is this any possible way to do that, Please advise me.


Solution

  • You should follow the below points

    1. You should add the Custom Stylesheet Link before Corev15.css
    2. Stylesheet in custom master page Link should have ms-design-css-conversion="no" - Tag to avoid sharePoint reorder the stylesheet

    Example tag look like below

        <link href="Your Custom Stylesheet path" rel="stylesheet" type="text/css" 
    ms-design-css-conversion="no" />