Questions tagged [css]

Anything related to cascading style sheets (CSS) as they specifically relate to Sitecore, official Sitecore modules, CSS file storage in and serving from the Media Library, and beyond. This tag is not meant for generall CSS questions that are not specifically related to Sitecore.

Filter by
Sorted by
Tagged with
1 vote
1 answer
246 views

How to add Custom CSS File and why it is not rendering to page

I have installed Sitecore 10 on my laptop recently and I am facing the following issues. Issue 1: I have created a site and I am trying to add a "custom css file" but I am not able to upload ...
user avatar
0 votes
2 answers
346 views

Sitecore container with variants to change background color

I'd like to build a component in Sitecore that I can drag other components into when using Experience Accelerator, just like the out of the box container component. I'd also like to add variants on ...
user avatar
  • 15
2 votes
1 answer
115 views

Checked styles by default

Is there a way styles can be checked by default?
user avatar
0 votes
1 answer
215 views

How to apply styles for partial designs in SXA?

I'm creating the header for an SXA site. I created a new header Partial Design, and then in Experience Editor added some stuff from SXA toolbox. So now, how do I apply (my custom) header CSS classes ...
user avatar
  • 11
0 votes
3 answers
369 views

Where to place the CSS file that i want to add for a Sitecore form field

I want to know where to place the CSS file that I want to add for a Sitecore form field. For the WFFM the path was /sitecore modules/Shell/Web Forms for Marketers/Themes. I am using Sitecore 9.1 and I ...
user avatar
  • 395
-1 votes
1 answer
92 views

Css not reflecting in sitecore modal window [closed]

I am opening a modal window using <a href="@Url.Action("SearchModal", "Myctrler",new { id =itemVal })" onclick="window.open('@...
user avatar
2 votes
1 answer
190 views

Sitecore Forms CSS Scripts - Dropdown selection

We are using Sitecore 9.2 Forms feature and within form plain fields, actions, analytics are great benefits, but when Job comes to look and feel of the Forms, I see there is a very tricky way to ...
user avatar
  • 89
0 votes
1 answer
737 views

Rich Text Editor - Apply CSS class around <tr> html tag

I have selected the complete row of the table, Then I have selected a class that changes the background color of the table row. The background color is not applying to the selected table row, because ...
user avatar
3 votes
0 answers
177 views

Loading Page Specific CSS in Sitecore

We are using Sitecore 8.2 and we have around 10-15 Page templates and all the CSS is bundled in a Global CSS and over the years the CSS file has grown tremendously resulting in below issues: We are ...
user avatar
5 votes
3 answers
5k views

Applying rich text editor custom classes

I have a custom css class that has been patched which I have verified in showconfig.aspx <?xml version="1.0" encoding="utf-8"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"...
user avatar
  • 1,313
4 votes
3 answers
1k views

Sitecore MVC FieldRenderer.Render - Add and persist inline styles & classes to links in the Experience Editor

I am trying to add custom classes & inline styles to a rendered link field in the experience editor without using Glass. I have a model the looks like this: public class Header { public ...
user avatar
  • 61
0 votes
1 answer
119 views

WFFM custom toggle switch [closed]

I am adding toggle switch as a custom field. Toggle.cs (Toggle C# code) public class Toggle: Sitecore.Form.Web.UI.Controls.Checkbox { } public class ToggleField : Sitecore.Forms.Mvc....
user avatar
4 votes
1 answer
1k views

Is there a way to put Sitecore Forms fields side by side without CSS

While dragging a form field onto the Sitecore Forms canvas, it seems that, there is no way within the interface to add columns of fields eg. two fields side by side. Is the only way to do this with ...
user avatar
6 votes
3 answers
375 views

SXA custom css priority level

How do I set the priority of css files so when it optimized all css files, custom css file gets higher priority?
user avatar
  • 293
3 votes
1 answer
165 views

Sitecore Language wise css changes

We are working on Sitecore "Arabic" and "English" languages. As you know Arabic start from right to left and English start left to right. Due to this reason we have to write two class for same element ...
user avatar
6 votes
2 answers
637 views

Images for different breakpoints

I have read various implementation approaches to render images in desktop/mobile view without cropping/stretching it. Last time I had a chat with a fellow developer, they insisted on having a ...
user avatar
3 votes
1 answer
2k views

How do I replace css background url with @html.Sitecore().field("Header Image")

I am using Sitecore 8.2 and I am working with the RenderingModel. I have a template field called "Header Image" that I would like to render on my Layout. Here is the css .microsite-banner{ ...
user avatar
3 votes
2 answers
3k views

Apply Css class around <p>, Rich Text Editor - Sitecore 8.2u2

EDIT: I'm doing this in the Design part of RTE, NOT Html. I select a piece of text thats in a <'p>. Then "Apply Css Class" to add a class which changes the background color. This becomes a <'...
user avatar
8 votes
3 answers
2k views

What's an efficient Frontend development process / workflow for Sitecore?

Does anyone have a Frontend development/prototyping process/workflow that has proven to be effective and efficient? I have multiple sites running on Sitecore. We are also MVC based. As a Frontend ...
user avatar
  • 81
3 votes
1 answer
894 views

SXA custom component, Is my component correct?

First of all, I'm sorry for my question because I'm beginner in Sitecore SXA and in English too. ;) I'm working on SXA compatible component and I have already advanced well I think but I must have ...
user avatar
7 votes
1 answer
930 views

Sitecore component CSS and script handling in an HTTP/2 environment

First project using Helix coming up. In our previous project we've used HTTP/2 on the CDN, so we have adopted a lot of new best practices. One of the most important new best practices in HTTP/2 is ...
user avatar
  • 91
8 votes
3 answers
5k views

How to Render Javascript per page or component?

So I have renderings that depend on specific CSS or specifically Javascript. Do you load the same Javascript on all pages even if the Javascript is for a specific page/rendering, or do you pull in ...
user avatar
  • 4,259