I have this binding configuration:
bundles.Add(new StyleBundle("~/styles/style1").Include("~/Content/library/styles/style1.css")
Then I added this code to display the related CSS:
@Styles.Render("~/styles/style1")
My CSS has this content:
.style1 { background-image: url("../img/image.png"); }
Due to linking, the path of the background image is not correctly directed to ~ / Content / library / img / image.png instead of ~ / img / image.png. I do not want to edit the path to the CSS file because many other pages use it. Do you know about any solution or lack of configuration in the kit?
source share