Tag Info

New answers tagged

0

You can use this code from JS in your app.      var context = SP.ClientContext.get_current();      var web = context.get_web();      web.set_alternateCssUrl('filepath.css');      web.update();      context.executeQueryAsync(successFunction, ...


0

display:block is what I needed. .fullPageLayout{margin:0 auto; width:70%; display:block;}


0

display:block is what I needed. .fullPageLayout{margin:0 auto; width:70%; display:block;}


0

Adding following CSS to the aspx page. The page which will get displayed inside the dialog. <style> #s4-workspace { background-color:black; } input[type=button] { border:none; } </style>


-1

Use this in you css #contentRow { overflow:auto; }


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

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)


0

The easiest way to accomplish this is to edit the HTML source, find the offending img elements, and add a style attribute with "border:0px;" <a href="..."><img style="border:0px;" src="..." /></a> The inline style will trump the CSS that adds the borders.


0

Check the element where the borders are applied, you have to apply your style at that selector. Please add screenshots taking from the dev tool bars for the borders.


1

The above answer is not right. It is totally unnecessary to touch corev15.css. These are the steps to apply custom CSS to SharePoint site hosted at Office 365. Find "Site Collection Features" setting and enable all features with name "publishing" in it. Find "Manage Site Features" setting and enable all feature with name "publishing" in it. Find "Master ...


0

This might not be a standard/recommended practice, but might work in your case.Try giving the link to the css file directly using the <link> tag rather than the <SharePoint:CssRegistration> tag


0

You can make it important as .fullPageLayout,.ms-blog-MainArea { width:100% !important; max-width:74em !important; } Best practice is to load you custom css after corev15.css


0

Try this <SharePoint:CssRegistration Name="<% $SPUrl:~sitecollection/Style Library/~language/Themable/Core Styles/tokyo.css %>" runat="server" EnableCssTheming="true" /> <SharePoint:CssRegistration Name="/SitePages/css/custom.css" runat="server" After="/Themable/Core Styles/tokyo.css" />


0

You can use CSS to hide the elements. First create a new css file with name ex: Custom.css and place it inside the site assets library. Then add following to your HTML master page: <!--SPM:<SharePoint:CssRegistration ID="CSSCustom" Name="&lt;% $SPUrl:~sitecollection/SiteAssets/Custom.css %&gt;" runat="server" ...


0

Add this CSS to your master page : .o365cs-base.o365cst.o365spo .o365cs-topnavLinkBackground { display: none; }


0

Try adding this in CSS of your masterpage or as part of editor web part custom css to see if it helps. <style type="text/css"> .ms-webpartPage-root { border-spacing: 0px !important; } .ms-webpartzone-cell { margin: 0px !important; }


0

You should use jQuery to JavaScript to change the icon. HTML is rendered as follows for Share Button <span style="height:16px;width:16px;position:relative;display:inline-block;overflow:hidden;" class="s4-clust ms-promotedActionButton-icon"> <img src="/_layouts/15/images/spcommon.png?rev=38" alt="Share" style="position: absolute; left: -200px; ...


-1

You can try with this style in either your master page or a css file: div#suiteBarLeft{ background-color: red; } In this example, the top blue color will be changed to red, you can change it to any color you want.


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


0

It is called the suitebar. If u are on premise you can change it. It is a web application property you can e.g set it with powershell as described here. http://sharepointryan.com/2013/04/16/customizing-the-sharepoint-2013-suite-bar-branding-using-powershell/ In SharePoint online you shouldn't change it.


0

Personally I'd put it into Layouts. Prevents accidental deleting or modification by clumsy site admins.


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>


0

I can confirm as per my comment that /_styles/corev4.css is auto-generated by SharePoint Designer when you edit and attempts to save corev4.css. To replicate: Create a new site collection Open it in SharePoint Designer Open v4.master (Don't check out) Click 'Styles' in the ribbon and then 'Manage Styles'. You'll see the style pane open in the right hand ...


0

Well then.. I spent hours looking for the answer, decided to ask here after pulling all my hair out, and I found the answer by playing around with the CSS! For anyone who googles this topic, rejoice for I have the answer and I'm going to actually share it! ANSWER: Don't put padding in #s4-mainarea, put it in .s4-ca! Here's all my CSS: #s4-bodyContainer { ...


0

This link should help you [here](http://erikswenson.blogspot.in/2010/01/change-sharepoint-search-icon-with-just.html, below is extract from same post what you need to follow is: Upload your custom images to a sub folder within the following directory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\IMAGES\YourCustomFolder ...


0

Following options cans be used: CSS td.ms-sbgo { padding:0px 3px 0px 3px; } td.ms-sbgo a { background-image: url(/Style%20Library/Images/our_search_button.png); background-repeat: no-repeat; background-position: top left; display:block; width:20px; height:19px; } td.ms-sbgo a img { display: none; } Use some jQuery to ...


1

This will work only if the drop-down control has an option with empty value. Try below $("select[title='"+Hide_Column+"']").val(''); Another option is to select the first option as below $("select[title='"+Hide_Column+"']").find('option:eq(0)').prop('selected', true);


1

If the page in question is a custom page, then you can use class to target the styles. That is the best practice. On the other hand if you are talking about SharePoint elements, then we should be careful with using class, because it might be used across and will have a global impact. In those cases we used to target the control's id for styling purpose. In ...


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



Top 50 recent answers are included