Answered by:
custom CSS not applying

Question
-
Hello,
I am trying to bold the quick launch headings. I asked a question not that long ago on what style to use to accomplish this which works if i change the corev4.css but I don't want to do that. Instead I want to place it in my custom css file.
I have a custom master page that also references a custom stylesheet:
<SharePoint:CssRegistration name="/Style Library/custom.css" runat="server" After="corev4.css"/>
Other styles in this custom.css styelsheet work without issue so I know it is referenced correctly.
In my stylesheet I have the following style:
/** Quick Launch Bold Headings**/
.s4-ql UL.root > LI > .menu-item
{
font-weight:bold !important;
}
Any ideas why this will not apply using the above? what am i missing?Thanks for the help.- Edited by olson2334 Thursday, June 16, 2011 4:03 PM
Thursday, June 16, 2011 3:07 PM
Answers
-
I find that it's best to create your custom CSS file in the Sytyle library, and then use the alternate CSS URL (under Master Pages in the look and feel section) to point to it. It loads that CSS last, and from there you can override any of the core styles. This doesn't require master page modification.
JohnThursday, June 16, 2011 3:16 PM
All replies
-
I find that it's best to create your custom CSS file in the Sytyle library, and then use the alternate CSS URL (under Master Pages in the look and feel section) to point to it. It loads that CSS last, and from there you can override any of the core styles. This doesn't require master page modification.
JohnThursday, June 16, 2011 3:16 PM -
Thanks for the response. I do have it currently in the style library. would the proper process be to get rid of my css reference in the master page and use the alternate css url?Thursday, June 16, 2011 3:38 PM
-
I made the change and it does apply. so lets say a few subsites deep a site wants to use the css specified in the alternate css url in addition to a few other changes. How would that work?
We wouldn't want to change the custom.css file set higher up as that would then apply those changes to anything using that stylesheet. It doesn't look like you can specify more than one stylesheet either.
Thursday, June 16, 2011 4:03 PM -
At a lower level, you can specify a different alternate CSS. You won't inherit from the one above, but you could replicate it into the new alternate(s). Keeping them current would be a pain. You can also do master page/page layout trickery at the lower levels as well, depending on your requirements.
JohnThursday, June 16, 2011 4:17 PM