Hi there,
I am having problems with Twine 2.0.11 Harlowe story format. The background image is not loading. I did not have this problem with Twine 2.0.2. I have tried so many different variations, including single quotations, have scoured the web over CSS solutions, and nothing works.
I have the Twine app in the same folder as another folder called "images" ,which is why I have the path directory below. The image in question is a jpg. I have tried other images too, and that doesn't work either.
My code is the following:
body {
background-image: url("images/alien.jpg");
background-size: 100%;
background-repeat: no repeat;
}
tw-story {
font-family: 'Arial', monospace;
color:#ff0000;
font-size: 2.0em;
}
Thank you for your help.
Comments
This is why media referenced by relative url's only work if you use the Publish to File option to create a Story HTML file, and if you save that HTML file in a location relative to the one you are storing your media files in.
note: This location should not be the folder you installed the Twine 2 application into, and it should not be the folder that the Twine 2 application stores your Story Project HTML files into. **
I suggest you create your own folder to store your Story HTML files into, and create your "images" folder within it.
(** which is accessed via the Twine -> Show Library menu items)
This is what I have done:
1. I have moved my Twine app to my Applications Folder and created an alias on my desktop bar.
2. I have also moved my images folder (where the jpg image is located) into my Documents -Twine- Stories directory (which I accessed via Twine -Show Library) where my Twine html story files are saved by default by Twine. My background image still doesn't load.
I don't know how to create my own folder and ask Twine to store the html files there because it, by default stores them in the Documents-Twine-Stories.
Thanks again!!!!
So, now it seems to work??
When I open my html file, the background image is there. But, when I test my file through Twine through Test or Play, the image is not there.
Anyway...
Try putting
background-color: transparent;
in your tw-story css section.
Thanks!
note: The following information is based on my possible incomplete knowledge of how a node-webkit applications works (and in particular the Twine 2 application) but none of the Twine developers have ever supplied a contradicting response, nor have I read one else where. If someone else knows better please speak up.
1. It is NOT possible to see a media file referenced using a relative URL when using the Test and Play options. This is because when you use those options there is NO temporary HTML file for the media file to be relative to.
2. Do NOT store your own files within the folder accessed by the Twine -> Show Library menu options, that folder is for the Twine 2 applications internal use only as it is where your Story Project HTML files are stored. If you damage or override one of the HTML files contains within that folder you could loss one-or-more of your Story Projects.
note: the Story Project HTML files are NOT standard HTML documents!
3. You can ONLY see relative referenced media files if you use the Publish to File option to create a Story HTML file, and if you save that HTML file within a location on relative to where you have stored your media files.
4. Do NOT use the folder(s) you have installed the Twine 2 application into as the location you store either your Story HTML file or the relative media files in. Create your own folder(s) on your local hard-drive to store your Story HTML file and your relative media files into.