Question

J'utilise plusieurs stylides personnalisés dans mon Masterpage personnalisé, mais c'est important dans quel ordre ils sont rendus.Sur le premier, j'utilise la propriété après ceci:

<SharePoint:CssRegistration runat="server" ID="Custom1" Name="/_layouts/15/Custom1.css" After="corev15.css" />

Mais puis-je faire cela avec ma feuille de style personnalisée aussi?Je veux quelque chose sur les lignes de ceci:

<SharePoint:CssRegistration runat="server" ID="Custom2" Name="/_layouts/15/Custom2.css" After="Custom1.css" />

Mais écrivant simplement cela ne semble pas aider, ils sont insérés dans un ordre aléatoire, parfois le bon ordre, parfois pas.Devrais-je utiliser un chemin différent dans "After" ou n'est-ce pas possible de faire?

reconnaissant de réponses!

Était-ce utile?

La solution

Try adding the path, as you have done in Name also, in After. Or since you have the css files directly in the 15, remove the path from the Name property.

First option:

<SharePoint:CssRegistration runat="server" ID="Custom2" Name="/_layouts/15/Custom2.css" After="/_layouts/15/Custom1.css" />

Second option

<SharePoint:CssRegistration runat="server" ID="Custom2" Name="Custom2.css" After="Custom1.css" />
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top