Custom css background image - strange behavior

Adding custom css under Appearance > Customize then under Additional CSS I add …

body {
    background-image: url("https://dev-miamicountyohio.pantheonsite.io/wp-content/uploads/2024/09/mco_campus.jpg);
    background-size: 100% auto;
    background-position: 0 150px;
    background-repeat: no-repeat;
}

the image only displays when there is a leading quote (single or double) inside URL(). This is obviously incorrect but it works. When I correct the css with opening and closing quotes inside URL() the image disappears.

What is happening?

Hello @brocknessmonster,

Thanks for writing to us.

It might be the issue of other CSS code which has an error in CSS syntax. I would suggest you please check your custom CSS code. You can check your CSS errors online here.

Hope it helps
Thanks

I linted my css. There were no errors.

Hello @brocknessmonster,

To help you with your concerns we need to check your settings, I would request please share the admin login details meanwhile I would suggest you troubleshoot a few of the common issues before we investigate your settings. Please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password
  • Exact layout URL

You can find the Secure Note button at the bottom of your posts

Thanks

Thx for the reply. I decided to start over with a fresh install or Wordpress and Pro. I just added the above CSS (w updated img link) to the Customize Additional CSS and it is working.

Thx for the reply and offer of assistance.

You are most welcome @brocknessmonster

Hello @brocknessmonster,

By withdrawing the post, I believe you already have resolved the issue. If the issue still exists, you can let us know.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.