Custom CSS in Elementor without making a mess

Custom CSS scattered across 40 widgets is one of the hardest things to untangle on an Elementor site. Where it should go, and when not to use it.

The hardest Elementor sites to work on aren’t the ugly ones. They’re the ones where a previous developer added little snippets of CSS to dozens of individual widgets, so a button turns red for no visible reason and the only way to find out why is to open every element on the page.

Custom CSS is useful. Elementor can’t do everything through its panels, and a few lines of CSS often solve a problem neatly. The mess comes from where it’s put and whether anyone wrote down why.

The places CSS can live

On a typical Elementor Pro site, CSS can sit in at least five places:

Location Scope Use it for
Widget or container > Advanced > Custom CSS That one element Genuine one-off tweaks
Page Settings > Advanced > Custom CSS One page Rare; a page-specific fix
Site Settings > Custom CSS Whole site Most site-wide rules
Appearance > Customize > Additional CSS Whole site (theme) Older sites; avoid adding more here
Child theme stylesheet Whole site Larger amounts of CSS, under version control

The element, page and site-level Custom CSS fields are Elementor Pro features. In the newer V4 editor, Custom CSS was rebuilt for atomic elements and, per Elementor’s 3.33 release notes, is available on Pro’s Advanced plan or higher, with the CSS scoped to its element and able to attach to global classes.

Our rule: one main home for site-wide CSS, usually Site Settings > Custom CSS, with element-level CSS only for things that truly belong to one element. If you inherit a site with CSS in all five places, consolidating it is part of the clean-up.

The selector keyword

When you add CSS to a single widget or container, Elementor gives you a shortcut: the word selector. It stands for that element’s own wrapper, and Elementor swaps in a unique class when the page is generated.

So on a Heading widget, this:

selector .elementor-heading-title {
  text-wrap: balance;
}

applies balanced line breaks to that heading only, without you needing to know its ID. And this, on a container:

selector:hover {
  transform: translateY(-4px);
}

lifts that one container on hover.

Two things to know. selector is a shortcut for element-level Custom CSS; in site-wide CSS, target your own classes instead. And if you find yourself pasting the same selector rule onto ten widgets, it isn’t a one-off. Give those widgets a shared class instead.

Use classes instead of copying rules

Every element’s Advanced tab has a CSS Classes field, available in the free version too. Type a class name there (no dot), then write the rule once in Site Settings:

/* Service cards: lift on hover. Used on Services page and homepage. */
.tds-card-lift {
  transition: transform 0.2s ease;
}
.tds-card-lift:hover,
.tds-card-lift:focus-within {
  transform: translateY(-4px);
}

Now the effect lives in one place, you can find every use of it by the class name, and changing it changes every card. A short prefix (such as tds-) keeps your classes from colliding with Elementor’s or a plugin’s.

Notice the :focus-within in that example. Whenever you add a hover effect, add a matching focus style so keyboard users get the same feedback. Our article on accessibility in Elementor builds explains why.

Keep it documented

CSS without comments is a puzzle for the next person, and the next person is often you in 18 months. At minimum:

  • Comment every block with what it does and where it’s used, as above.
  • Group by purpose: typography fixes, header, forms, specific sections.
  • Date anything that’s a workaround, for example /* 2026-11: fixes Loop Grid gap bug, remove once fixed upstream */. Workarounds have a habit of outliving the bug.
  • Keep a copy outside WordPress. A text file in the project folder is enough. If a migration goes wrong, or someone clears a field by mistake, you’ll want it back. That’s one of the things we check during a move to a new host.

When CSS is the wrong fix

Before writing any CSS, ask whether Elementor can already do it. Very often the answer is yes, and the panel setting is easier for the next person to find and change.

Wrong fix: overriding colours and fonts with CSS. If headings are the wrong colour sitewide, fix the Global Colors or Global Fonts in Site Settings. CSS that forces color: #123456 !important fights the design system and will confuse whoever edits the site next.

Wrong fix: forcing layouts. Containers with flexbox and grid settings handle almost every layout. CSS that sets widths, floats or absolute positioning on elements usually breaks on a screen size you didn’t test.

Wrong fix: hiding content on mobile with display: none. Elementor’s Responsive settings (on the Advanced tab) do this cleanly, and they show up in the editor so others know the element is hidden.

Wrong fix: covering up a structure problem. If you need negative margins to pull a section into place, the nesting is probably wrong. Fix the structure.

Wrong fix: !important everywhere. One or two are sometimes necessary to beat a plugin’s styles. Twenty means the CSS is fighting itself.

The good uses tend to be small and specific: balancing headline line breaks, styling a third-party embed, a subtle hover effect, tweaking a plugin’s output that Elementor can’t reach, or a print stylesheet.

Before you hand it over

Run through the site’s CSS once before launch. Delete anything that no longer applies, move one-off rules that turned out to be repeated into classes, and make sure every block has a comment.

When we build a site through our Elementor web design service, this tidy-up is part of handover. Inherited a site with uncommented CSS scattered across five places? Untangling it is a common WordPress and Elementor fix for us, and you can send us the URL to get it started.

Who wrote this

The Design Space is a team of five in Ballina, NSW, with more than 10 years of web design, branding, photography, SEO and social media work for more than 100 clients across the Northern Rivers and further afield. We write these guides from the work we do every week, and we have 40 five-star Google reviews.

Web design SEO Social media Branding Photography Our work

Get in touch

Want us to do this for you?

If you’d rather hand this over, tell us about your business and what you need. We’ll reply with ideas and a price.