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

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...

PowerShell For create Sub site in office 365

#Add references to SharePoint client assemblies and authenticate to Office 365 site Add-Type -Path "\Software\SharePoint 2013 Client Browser v1.7\Microsoft.SharePoint.Client.dll" Add-Type -Path "\Software\SharePoint 2013 Client Browser v1.7\Microsoft.SharePoint.Client.Runtime.dll" $Username = Read-Host -Prompt "Please enter your username" $Password = Read-Host -Prompt "Please enter your password" -AsSecureString $Site = "https://XXXXXXX.sharepoint.com/sites/Test2/" $Context = New-Object Microsoft.SharePoint.Client.ClientContext($Site) $Creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username,$Password) $Context.Credentials = $Creds $csvLocation = "C:\Users\PS_SiteCollectionsToCreate.csv" $csv = Import-Csv $csvLocation #List Custom Templates $Templates = $Context.Site.GetWebTemplates("1033","0") $Context.Load($Templates) $Context.ExecuteQuery() $Templates | Whe...