Howdy, Stranger!

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

Changing layout in sugarcube 2

I am trying to setup the layout for multiple panes using multiple divs. my simple test code i cant seem to get working each box is about 1/5th lower than the previous, so they don't line up at all. I am also wondering if flexbox does not work with sugarcube, I am not sure if I did something wrong but when I tried using it, I got a full page of garbage text.

css code
.floatbox{
margin: 1%;
float:left;
width:15%;
height:400px;
background-color: green;
}



code in the passage
<div class="floatbox">text</div>

<div class="floatbox">text</div>

<div class="floatbox">text</div>

Thanks

Comments

  • If the extra panes are defined within the current passage they will be destroyed when the Reader navigates to the next passage.

    Do you want the extra panes to exist across the life-cycle of the story?
  • I was planning to copy and paste the base layout passage to passage, since most of the passages will have it but not all will have it. I guess in the end I expect to have around 3-4 different layouts. So I am looking for extra panes that last just the passage and can be rebuilt the next passage if necessary.

    Thanks
Sign In or Register to comment.