0

I like to do custom styling in my sharepoint 2010 site.

I have a three options: 1. Custom css file in style library and register css on master page. 2. Using Page layout. 3. Edit default styles of hive folder.

The question is that which one of above is better and is any thing written by Microsoft for custom styles?

3 Answers 3

1

I don't believe there is a "best" place for custom CSS.

It depends on what are your options, really.

Microsoft tends to tell you to create CSS files in the Style Library of the root site (based on the many customization tutorials they have).

If you can/need to deploy a solution, you can use the hive and unghost them if you need using SharePoint Designer (best when you need to respect the deployment lifecycle).

There are actually more options, like using a CEWP to deploy styles or scripts to a single page without using and IDEs.

I tend to use an external CSS file whenever I can and it makes sense (more than 2 or 3 styles), otherwise I embed them in a page by editing it in SPDesigner or creating a CEWP. Then reference the file in the master page, page layout, or the page itself, whether you want to reflect the changes in the whole site, or just a specific set of areas.

0

dont change anything from ms! best to overwrite it!

1) is for global css change!

2) is for specified page changes!

3) just dont do!

if you want to change the styles of the ribbon and colour ect throughout all sites and pages than 1 is your best bet.

layout pages are master pages other half.

think of masterpage is the outer layer than contains everything. within the masterpage you have a body (layout page). Layout page might contain zones, these zones can contain webparts or other containers!

ammending the layout is local to only a part of the full page and not the whole thing!

within the masterpage add your css after the last css being applied. That means your css would be last to be rendered overwriting other css. Some css have !important in core.css so you might need to add !important aswell to overwrite core.css!

0

Option 1

You are not supposed to edit the default styles in Hive folder (Never go for Option 3)

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.