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
0 votes
1 answer
80 views

Rich Text Editor custom css - how to add classes to the dropdown that aren't displayable in the dropdown?

On Sitecore 9.1. I've created some custom classes for content authors to use. The authors want these classes to be dropdown options in the rich text editor so they can apply them easily. I added them ...
Erica Stockwell-Alpert's user avatar
1 vote
1 answer
434 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 ...
Firoz Khan's user avatar
0 votes
2 answers
522 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 ...
natg504's user avatar
  • 15
2 votes
1 answer
152 views

Checked styles by default

Is there a way styles can be checked by default?
user avatar
0 votes
1 answer
288 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 ...
hontoni's user avatar
0 votes
3 answers
597 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 ...
Debaparna's user avatar
  • 487
-1 votes
1 answer
113 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('@...
Barada Behura's user avatar
2 votes
1 answer
227 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 ...
Nick's user avatar
  • 109
0 votes
1 answer
966 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 ...
Kumar K s's user avatar
3 votes
0 answers
209 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 ...
Alivor Tikos's user avatar
5 votes
3 answers
6k 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/"...
Jen's user avatar
  • 1,353
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 ...
LSpell's user avatar
  • 61
0 votes
1 answer
125 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 ...
Antony Day's user avatar
6 votes
3 answers
423 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?
Discovery's user avatar
  • 293
3 votes
1 answer
181 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 ...
Ketan Garala's user avatar
6 votes
2 answers
702 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 ...
novicecoder's user avatar
3 votes
1 answer
3k 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{ ...
Paul T. Rykiel's 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 <'...
Filip Jönsson's 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 ...
Cienwen's user avatar
  • 81
3 votes
1 answer
924 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 ...
Fabien G.'s user avatar
7 votes
1 answer
988 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 ...
chilly's 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 ...
Dylan Young's user avatar
  • 4,304