Howdy, Stranger!

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

Adjusting left Sugarcube margin.

Hi, I've been trying to figure this out, and I found a couple of post that almost answer my question but not quite.

I'm using Sugarcube 2 and I've removed the sidebar using

#ui-bar {
display: none;
}

Now I'm trying to shift the text over to the left because it's way in the middle https://imgur.com/a/DDZS9

I've tried adjusting the margins and I've tried using @media but I'm clearly doing something wrong. What else could I try?

Comments

  • I'm using Sugarcube 2 and I've removed the sidebar using
    #ui-bar { 
        display: none;   
    } 
    
    Now I'm trying to shift the text over to the left because it's way in the middle […]
    That prevents the UI bar from being displayed—i.e. it hides it—it does not remove it.

    The following will actually remove the UI bar and, more importantly, its styles, which are what reserves space for it on the left side of the page: (goes in: Twine 1 – a script-tagged passage; Twine 2 – the Story JavaScript)
    $('#ui-bar').remove();
    $(document.head).find('#style-ui-bar').remove();
    

    n.b. The main passage display area will still be centered within the story content area, which I do not recommend changing, but that's up to you.
  • The left and right margins of the main passage area are controlled by the default #passages related CSS rules which assign a fixed width to the area and then uses automatic calculated left and right margins to center it.
    #passages {
        max-width: 54em;
        margin: 0 auto;
    }
    

    note: The SugarCube side-bar can be minimised using the toggle arrow in the top left corner of it, this is also a configuration setting which can be used to make it minimised at the start. If you disable the side-bar completely then people will not be able to save their progress unless you implement your own save/load interface.
  • Great! Thank you both. That was very helpful. For the project I'm doing I don't need people to be able to save, so that's not an issue.
Sign In or Register to comment.