Background Image in Header in CSS
-
I’ve noticed that if I create a background image in a header, then it is not created as an HTML element. The URL is only present in the CSS like so:
[data-header*="type-1"] .ct-header [data-row="top"] --background-image: url(http://localhost/wordpress/wp-content/uploads/2020/05/mybackground.jpg);This leads to problems when changing the site’s URL or, as in this case, migrating from localhost to the production server. The usual migration tools do not pick up on URLs in stylesheets, they only search the database.
So I wonder if it would make sense for you to store those values in the database instead of in the stylesheet?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Background Image in Header in CSS’ is closed to new replies.
