Custom CSS only works on the Edit preview but now on the Live site

Hi,

I have some custom CSS on the custom CSS section, it works perfectly on the edit mode, but once I logout and view in the live site, there is no CSS apply.

Hey,

Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

– Link to your site
– WordPress Admin username / password
– FTP credentials

Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

And clear your cache.

I don’t how to reply as private, I sent your DM instead, pls check

Hi There,

Please use the “Secure Note” when providing credentials instead, so other staff can see it.

screenshot

Thanks,

1 Like

thx’s for your info, secure noted created.

Hi There,

You’re referring to your class x-section-1 right?

.x-section-1 {
	min-height: 100vh;
  	background-color: #000;
}

Here’s the thing, Sections has a Background Type option. Regardless of the type you select (except video) that option will be applied to your section as inline-style. In CSS inline-style takes priority over embedded-style (Page CSS, or Theme Option > CSS). Even if you set the Background Type to none, that will still output background-color: transparent; which override your background-color: #000; make sense?

You can add !important statement to your background-color: #000; to make it more stronger. However, that is not what I would suggest. I suggest you remove your class x-section-1 altogether.

Set your section’s Background Type to color and select a black, that option is there for a reason.

Then you can add the min-height: 100vh; on the section’s STYLE field.

Hope it helps,
Cheers!