I am working on a project where I need to set an image on a submit button. Because there is integration with third-party software, the only way to accomplish it is to use the background style in CSS. However, the URL for the image doesn't resolve properly in CSS, so I need to include the tilde that is a part of the folder name in the URL.
Here is the CSS that I currently have set:
input[type=submit] {
background:url('~images/continue.png');
border:0;
color:transparent;
width:150px;
height:50px;
}
I tried escaping with a backslash, ascii, double tilde, and a few others to try and get the CSS to see the tilde in the URL as just another character, but it still is doing standard CSS evaluation and not getting to the correct folder.
Why not just use the full URL? Unfortunately, I have no idea what the URL is going to be since it is dynamic, but I know the URL format to get to the image is roughly:
www.website.com/some unknown text/~images/image name
In the page that I created, I use "images/image name" for regular images that just use a src tag, but the third party software resolves that to "~images/image name" when it pulls them in.
Is there a way to make the CSS use the tilde as part of the folder name instead of assuming it is supposed to go to a different folder? Or is there a way to pull in the current URL directly in the CSS, so it ends up with the full path?