Howdy, Stranger!

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

Inserting Whitespace

edited March 2015 in Help! with 2.0
Sorry if this is a stupid question, but I'm pretty new to twine I haven't been able to find the answer anywhere.

How would I insert whitespace within a line?

For example, if I wanted to have two links display like this:

Go Left                                  Go Right


or whatever, twine would automatically truncate the spaces or tabs in the center to one space, and display like this:

Go Left Go Right


This makes enough sense as a default to prevent weird formatting from code and stuff, but I can't seem to find a way to break out of it, unless I'm missing something obvious.

I'm using twine 1.4.2 with Sugarcane.

Comments

  • Well, since twine text is HTML, you can always throw in no-break spaces.
    Go Left           Go Right
  • You could use non-break spaces as suggested by @InspectorCaracal or you could use the following HTML / CSS to both center and space out the option links.

    If you wrap all your option links in a classed div then you can treat them as a set, which you can apply visual effects to like centering and margins:

    <div class="options">[[Go Left]] [[Go Right]]</div>

    <div class="options">[[Option 1]] [[Option 2]] [[Option 3]] [[Option 4]]</div>
    You can then use that class (options) to apply the following CSS which will center and add a margin to the left of all options except the first one

    #passages .options {
    text-align: center;
    }
    #passages .options a {
    margin-left: 2em;
    }
    #passages .options a:first-of-type {
    margin-left: 0;
    }
    note: You change the 2em value to incress or decress the space between the individual option links.
  • Thank you both very much. I actually ran across @InspectorCaracal';s solution after some more fumbling around, so that's what I'm using right now, but I will definitely keep both in mind in the future.
Sign In or Register to comment.