Skip to main content

Apply Branding on SharePoint 2019 without updating master page




Hello Everyone,


I am pleased to inform you that, using blog code you will be able to apply branding on your SharePoint 2019 SharePoint Site without updating master page and layout page. Using this code you don’t have update or modify anything on you site just upload this code file to Style library and set css link to your site, supper easy. 

  1. Download this copy CSS and create css file.
  2. Upload css file to your SharePoint style library
  3. Go to Site setting > Look and Feel > Master page >click on Alternate CSS URL> select “Specify a CSS file to be used by this site and all sites that inherit from it:” > click on Browse > select your css file > Click OK


You are done. 

Enjoy  SharePointing 


********************************CODE********************************************

/* Left navigation(begin) */
.ms-core-listMenu-verticalBox UL.root > LI > .menu-item{  
  background-color:#f3f3f3;  
  color:#000;      
  min-height:25px;  
  padding-top:5px;  
  padding-left:10px;   
  border: 1px solid rgba(255,255,255,0);
  border-bottom: 1px solid #e7e7e7;
  
 }  
 .ms-core-listMenu-verticalBox > ul.root > li.static > ul.static > li.static > a:hover {  
   color: #ffffff !important;  
   background-color:#ca5010 !important;  
   text-decoration:none;  
 }  
 .ms-core-listMenu-verticalBox > ul.root > li.selected > a {  
   background-image:none;  
   background-color:#ca5010;  
   color:#ffffff !important;  
 }  
 .ms-core-listMenu-verticalBox > ul.root > li > a:hover {  
   background-image:none;  
   background-color:#ca5010;  
   color:#ffffff !important;  
    
 }  
 .ms-core-listMenu-verticalBox > ul.root > li.static > ul.static > li > a {  
  font-size:12px;  
  padding-left:10px;  
  
 }  
 .ms-core-listMenu-verticalBox > ul.root > li.static > ul.static > li > a.selected {  
   background:none;  
   color: #ca5010 !important;  
   background-color:#ffffff !important;  
   text-decoration: none;  
   border: 1px #fff solid;  
   font-weight:bold;  
 }  
 .ms-core-listMenu-verticalBox a.selected  
 {  
  border: 1px #fff solid !important;  
 }  
 .ms-core-listMenu-verticalBox UL.root UL  
 {  
  margin:0px 0px 10px 0px !important;  
 } 
/****-------------------------------------------------------------------------------------**/
/* Web Parts (begin) */

.ms-core-pageTitle {
    padding-left: 700px;
}
tr:nth-of-type(odd) { 
  /*background: #eee; */
}

th { 
  /*font-size: 12px !important;*/
  color:#003471!important; 
  font-weight: bold; 
  text-decoration:none;
  
}
td, th { 
  
  padding:3px; 
  text-align: left; 
}
.ms-webpart-chrome-title
{
    background:#ca5010;
 }
.ms-webpart-chrome-title nobr
{
white-space:normal !important;
}
.ms-webpart-chrome-title H2
{
margin:0;
padding:5px;
}
.ms-webpart-titleText.ms-webpart-titleText A,
.ms-webpart-titleText.ms-webpart-titleText SPAN
{
color:#fff;
font-size: 14px;
}
.ms-vl-sectionHeader .ms-webpart-titleText A,
.ms-vl-sectionHeader .ms-webpart-titleText SPAN
{
color:#262626;
}
.ms-webpart-titleText.ms-webpart-titleText
{
text-align:left!important;
}
.ms-wpContentDivSpace
{
background-color:#fff;
}
.ms-wpContentDivSpace .ms-listviewtable
{
width:100%;
}
.ms-alternatingstrong
{
background-color:#F5F1F2;
}
/* Web Parts (end) **************************************************/

/*** Top Navigaion Menu Items container DIV ****************************************/

.ms-core-listMenu-horizontalBox {
 /***  padding-left:50px; **/
  display:inline-block; 
  text-transform: uppercase;
}
/*** Top Navigaion Static Menu Items ***/
.ms-core-listMenu-horizontalBox li.static {
border: 1px solid transparent;
background: url("/_layouts/Images/selbg.png") repeat-x left top;
}
/*** Top Navigaion Static Menu Item Links ***/
.ms-core-listMenu-horizontalBox li.static > .ms-core-listMenu-item {
color: #000;
white-space: nowrap;
padding: 10px;
padding-left: 20px;
margin-right: 1px;
}
/* Top Navigation static Menu Item Links Hover Style */
.ms-core-listMenu-horizontalBox li.static > .ms-core-listMenu-item:hover {
background: url("/_layouts/Images/selbg.png") repeat-x left top;
background-color: #f3f3f3;
color: #000000;
text-decoration: none;
}
/*** Top Navigaion Static Menu Selected **/ 
.ms-core-listMenu-horizontalBox li.selected a.selected {

background-color: #f3f3f3;
color: #000;
text-decoration: none;
padding: 10px 10px;
margin: 1px;
}
/*** Sub-Menu/Flyover/Dynamic Menu Container ***/
ul.dynamic {
background-color: rgb(218, 220, 224);
padding: 1px;
margin-top: 5px;
}
/*** Sub-Menu Items (HyperLinks) Style ***/
ul.dynamic .ms-core-listMenu-item {
background-color:#ca5010;
color:#fff;
padding: 10px 20px 10px 20px;
white-space: nowrap;
}
/*** Sub-Menu Items (HyperLinks) Hover Style ***/
ul.dynamic .ms-core-listMenu-item:hover {
background-color:rgb(241, 243, 244);
color: #000;
}
/** Hide "Edit Links" ***/
.ms-listMenu-editLink {
display: none !important;
}

Comments

Popular posts from this blog

Update user language and regional settings with CSOM

Following my previous post around multilingual aspects of SharePoint Online:  Modify Site Regional and Language settings with JSOM and JavaScript Here is some CSOM code which updates the personal regional settings of the current user or another user (if you are a tenant admin and have the rights to update user profiles) Before update: The code: using Microsoft.SharePoint.Client ; using Microsoft.SharePoint.Client.UserProfiles ; using System.Security ; namespace UpdateLanguagePreference { class Program { static void Main ( string[] args ) { //Tenant Admin Details string tenantAdministrationUrl = " https://yoursite-admin.sharepoint.com/ " ; string tenantAdminLoginName = " tenantadmin@yoursite.onmicrosoft.com " ; string tenantAdminPassword = " password " ; //AccountName of the user whos property you want to update. ...

Power shell Script to get External Users on Office 365

Hello Everyone,  Below is the Powershell script to get all external users from office 365 tenant. #--------------------------------------------------------------------------------------------------------------------------- $host.Runspace.ThreadOptions = "ReuseThread" #Definition of the function that gets all the external users in a SharePoint Online Tenant. function Get-SPOExternalUsers {     param ($sUserName,$sMessage,$sSPOAdminCenterUrl)     try     {             Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green         Write-Host "Getting all the external users in a SharePoint Online Tenant" -foregroundcolor Green         Write-Host "----------------------------------------------------------------------------"  -foregroundcolor Green         $msolcred = Get-Credential -UserName...

Build and Deploy a custom theme in SharePoint 2019: Using C# and Site features

Custom Theme and Branding are common to use cases and all kinds of business users like to have the personalized team and collaboration sites. today I am posting C# code that will help to build custom features for SharePoint 2019 site.   If need any assistance, I would be happy to help: kamal_pandey@outlook.com  ----------------------------- Code to build  custom features---------- using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.SharePoint; using Microsoft.SharePoint.Utilities; namespace SharePointBranding.Code {     public class BrandingManager     {         public SPWeb Web { get; set; }         public BrandingManager(SPWeb web)         {             Web = web;         }         public void SetMasterPage(stri...