Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Adding static image to Sugarcube 2.11.0

Before anyone shouts, I've looked through the docs and can't find the answer.

I wanted to add it to the dynamic 'slidy' sidebar in place of the title, but had no joy.

I can get it to appear in a passage with:
[img[title_picture.jpg]]
But I don't want to have to insert that in every passage.

I also tried:
.passage {background-image: url("title_picture.jpg");}
In the CSS, but again no joy.

And yes, I am publishing to file before I check to see if it's worked.

Any way to get it as a static image that sits above the passage descriptions without using the macro in every passage?

Comments

  • edited November 2016
    If you're trying to place a static image at the top of the UI bar, the StoryBanner special passage (link to the docs) would probably be the place to put it. You can do it in other ways, but that's likely the simplest.

    If you wanted to hide the actual title at the same time, then the following style should work:
    #story-title {
    	display: none;
    }
    
    NOTE: The selector may be found within the SugarCube 2.x HTML document.
  • I'd sussed the hiding of the story-title, but the StoryBanner has done the trick. Thank you.

    I can assure you I don't ask these questions for the fun of it. It's just that I have great difficulty in following instructions and understanding what seems to come naturally to most people.

    Thanks for your continued patience, everyone.
Sign In or Register to comment.