Tag Info

Hot answers tagged

7

If you have deployed the CSS file to the Style Library or an Assets library, make sure it is checked in as a major version and approved. It could be possible that your page layout is not published and approved as well. This is the typical symptom when an asset is not approved, it works fine for admins but not general users.


5

I guess you could always use a site collection token in your URL. ~sitecollection URLs and tokens in SharePoint 2013 If that don't work out for you, this blog post has a lot of great examples when working with masterpages and references. Use Site Url in SharePoint Update Try using a scriptlink instead. I'm unsure if encoding is needed thought. Try to ...


4

The ID will remain the same on your single SharePoint-Environment, but it can be different on other site collections. The name and the zz are always the same, but the number will change, so you have to build your css with wildcards, e.g.: div[id^=zz][id$=_TopNavigationMenu] { display: none; }


4

Here’s the code you should put on your pages: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="http://path to the script/StickyHeaders_v2.9BETA.js"></script> You can download StickyHeaders_v2.9BETA.js from here


4

I have been using Mavention minifier tool. It is working as expected and you can apply this on the particular files that you wanted. MaventionMinifiedCssFileGenerator - for minifying CSS files MaventionMinifiedJsFileGenerator - for minifying JavaScript files MaventionObfuscatedJsFileGenerator - for minifying and obfuscating JavaScript files are the ...


3

Styling using classes is usually the preferred way. Especially if you see IDs in HTML in ASP.NET control format, like "ctl00_ContentPlaceHolder1_CustomUserControl1_NestedExampleLabel", you should absolutely not bind styles to those ID's as they may change, even within the same environment, as controls get added/removed from the page. If you have control ...


3

My take on these: Server-side code is fun and easy to write, and you can incorporate any feature of SharePoint in order to manipulate it. You can build out vast solutions that touch many different aspects, even outside SharePoint, and bakes it into SharePoint using webparts, timer jobs, event receivers, and the like. It is hard to maintain, and migration ...


3

Ideally, you would start by creating a copy, rather than editing one of the existing master pages. Which one you choose is purely up to your own aesthetics. Once you're familiar with their creation, you can create one from scratch and with the built in design tools (available through the front end, generates web parts and unique content). As to where to ...


3

Update an oslo.css is not recommendable approach because it can break other elements which you might not find even. You should check with developer tools about the CSS. Which CSS is breaking the layout and try to override that CSS with your custom CSS in the masterpage. Here is the great solution Responsive SharePoint available that you can use with ...


3

I would recommend to use the 'Alternate CSS URL' for adding custom CSS to a SharePoint Site. Go to Site Settings -> Master Page -> 'Alternate CSS Url'. Browse for the custom CSS file and save it. This adds the CSS to the site without any change to the master page.


3

Your first approach is the best way to add a custom css file to a master page. Backing up master page and then creating a custom master page, adding custom CSS file to Style Library and then adding external CSS link under <head> tag. These steps are the most recommended and considered as best approach. Just make sure to add the external css link just ...


3

A ductape patch is adding a negative margin-top <div style="margin-top:-200px"> YOUR CONTENT </div>


3

You should try something like this .nav li a .menu-item-text, .nav li a:link .menu-item-text, .nav li a:active .menu-item-text { color:White !important; } .nav li a:hover .menu-item-text, .nav li a:visited .menu-item-text { color:#33CCFF !important; }


3

You would want to create an alternate css file. In it you would do .ms-pub-contentLayout { background-color: rgba(255, 255, 255, 1); } Save this css file in your site, then apply it using the Alternate CSS URL option in the MasterPage options, /_layouts/15/ChangeSiteMasterPage.aspx.


2

you can use the below css code for background image: background-image: url("Image.jpg"); background-repeat:no-repeat; background-position:top; background-size:cover;


2

You can do it as <img src='<SharePoint:EncodedLiteral runat="server" text="<%$SPUrl:~site/Shared%20Documents/enddate.png%>" EncodeMethod="HtmlEncode"/>' alt="" />


2

From comments: That means jQuery.fn.tab is undefined, which means the jQuery version you are working on does not have Bootstrap tabs appended to it. This could be the result of many things, such as not including the bootstrap script, or order of scripts, or having several versions of jQuery on the same page. There are several ways to get around this, such ...


2

Page Title is rendered as Try this .ms-core-pageTitle { font-size:2.77em; white-space:nowrap; color:pink; /*Let us test colour*/ font-size:9.77em;/*make it huge*/ /*You edits here*/ } Override the above in you master page or custom css file.


2

try using the below script in CEWP: <a onclick="modalcall()" href="#">Add New Item</a><script type="text/javascript"> function modalcall() { SP.UI.ModalDialog.showModalDialog({ url: "NewForm.aspx", title: "New Item", //allowMaximize: true, //showClose: true, dialogReturnValueCallback: ...


2

In the master page file, add the following line just before closing the <head> tag. <SharePoint:CssRegistration ID="CssRegistration" Name="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" After="corev15.css" runat="server" /> </head>


2

try using valign property for TD if you are not using HTML5 <td valign="top"> </td> else if you are using HTML5 you can try using CSS instead <td style="vertical-align:top"> </td>


2

You can do so by changing the CSS for that control. The control is implemented differently in On Premise than O365, so here's how to change it in both scenarios: Office 365: .o365cs-base.o365cst .o365cs-topnavBGColor, .o365cs-base.o365cst .o365cs-topnavLinkBackground{ background-color: red; } This is to change it to red color for example. In an on ...


2

You can edit the master page HTML file and then add your CSS & JS references. The best practice is to take a copy of seattle.html (html master page) and then work on that. SharePoint online refer custom css and javascript in MasterPage (Site Assets)


2

If you just want to add a custom CSS and JS to your master page, then instead of creating a new master page, try the following and check if it works for your purpose. For Custom CSS : Use the Alternate CSS Url to set a custom CSS File. For referring a custom JS file follow this approach - ...


2

Add the css as: <style type="text/css"> div.ms-webpart-zone.ms-fullWidth { width: 700px; } </style> Note: This change will apply to all your webpart zone(s) in the page. To apply it to a particular element prepend the CSS with a unique element identifier.


2

You should be able to do this using custom js link for the default list view, check out these sample it will direct you on how to implement it. Client-side rendering (JS Link) code samples There is an awesome post which describes the appraoaches for JS Link check out: SP 2013: Using the JSLink property to change the way your field or views are rendered in ...


2

You can achieve this with what is called Client Side Rendering (CSR). These are the best articles I have come across on CSR and how to use it: SharePoint 2013 Client Side Rendering: List Views SharePoint 2013 Client Side Rendering: List Forms Note: Some people use the terms CSR and JSLink interchangeably, but they are NOT one and the same thing. CSR is a ...


2

I agree with the previous answers ! I have recently started using CSR to style both lists and some basic modifications to new / edit / display forms. Once you get going with it, there is quite a bit you can do. The links provided are excellent, I just wanted to add one of my own with a working script as I struggled to find examples that showed how to ...


2

Most likely the location you saved the css file requires the document to be checked in and approved. Check that it is version 1.0 and approved.


2

Check in and publish as major version the masterpage



Only top voted, non community-wiki answers of a minimum length are eligible