Welcome Guest, Not a member yet? Register   Sign In
Set Base URL to background image path in External CSS
#3

Assuming you are developing on one machine, and deploying to somewhere else, so the domain names will be different on all the instances, best solution usually means using relative paths.

You know where the CSS is, so you can go from there, replace it with ../../ui/assets/img for example. Remember not to start with / as this will point to your base domain.

If you absolutely must do absolute paths in CSS file, you could set up a controller that outputs CSS file format text, however 99% of the time that's just over-complicating something that can be done with very straight forward solution.
Reply


Messages In This Thread
RE: Set Base URL to background image path in External CSS - by Pertti - 06-22-2018, 01:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB