0
votes

My Question is how to apply custom css to sharepont 2013 masterpage properly. I want to customize global navigation which is working when i doing like this way: Site settings -> Under Look and Feel Master Page -> Alternate CSS URL -> "Specify a CSS file to be used by this site and all sites that inherit from."

Result:

enter image description here

But my goal would be to create my own masterpage(copy of seattle.master) which contains my custom Css file via Sharepoint CssRegistration. If i do this the corev15.css going to overwrite my file and the navigation bar will fall apart.

I've tried this:

 <SharePoint:CssRegistration name="&lt;% $SPUrl:~sitecollection/Style Library/Custom/Blue.css %&gt;" runat="server" after="SharepointCssFile" />

or:

 <SharePoint:CssRegistration name="&lt;% $SPUrl:~sitecollection/Style Library/Custom/Blue.css %&gt;" runat="server" after="corev15.css" />

For Sure the Cssregistration is working but the corev15.css overwrites everything. Any ideas how could i bypass corev15.css?

Thanks in advance, bfrenky01

2
could it be that the css selector weights of corev15.css are bigger than your custom weights. Please post the the relevant css parts - Fabiano

2 Answers

0
votes

Although your desired approach isn't recommended (it would be better to override the corev style sheet) you could use Sharepoint designer, copy the corev (so you can roll back if needed) and simply edit the original.

I would recommend also you visit Heather Solomons website, as it is a great resource for all things Sharepoint branding. Heather Solomons website

0
votes

I would suggest to overwrite inside your blue.css, every sharepoint class that you are not satisfied with.

In term of design, some main component of sharepoint must remain in your file design, at least for the people that will edit the pages, such as ribbon CSS etc.