Twine Version: 2.5.1
Story Format: Harlowe
Hi there! I’m trying to create a layout for my game in which there are two columns, and you can scroll in both independently (here’s an example of the kind of thing I’m talking about.). I’m using CSS to create these two columns, rather than Harlowe’s built-in column feature, because it allows for more flexibility with spacing and arrangement.
I’ve implemented the two columns successfully. However, no matter what I try, I can’t get them to scroll independently of each other. There’s plenty of advice out there about how to implement independent scrolling columns in regular CSS, but I can’t seem to apply any of that advice to Twine. Whatever I try, it just breaks. For example, the overflow: scroll feature should in theory make the left column scrollable: but instead, Twine just defaults to scrolling down the entire page, rather than just the left column.
I’m also a complete novice to CSS, so there may be some obvious solution I’m missing here. I’m going to dump the entirety of the stylesheet here, in case other parts of my code have screwed something up.
The code for the columns is at the bottom (.leftcolumn and .rightcolumn).
tw-story {
color: #d6c3b4;
background-color: #1c091b;
}
tw-link:active, .enchantment-link:active {color: #F2784B}
tw-link, .visited {color: #FF9D3D}
tw-link:hover, .enchantment-link:hover {color: #EB657A}
hr
{
height: 3px;
background-color: #d6c3b4;
border: none;
}
#box
{
float: right;
width: 300px;
padding: 10px;
border: solid;
border-width: 5px;
border-radius: 10px;
}
tw-icon[title="Undo"], tw-icon[title="Redo"] {
display: none;
}
*
{
margin: 0;
padding: 0;
white-space: normal;
}
tw-story
{
width: 1920px;
padding: 0px;
margin-top: 0px;
}
tw-passage
{
width: 1024px;
margin: 25px;
padding: 25px;
}
#box
{
float: right;
width: 300px;
padding: 10px;
border: solid;
border-width: 5px;
border-radius: 10px;
}
#content
{
float: left;
width: 1500px;
}
.leftcolumn {
float: left;
width: 750px;
margin-right: 50px;
}
.rightcolumn {
margin-left: 750px;
width: 675px;
}
#align-center {
text-align: center;
}