I followed this page’s instructions to create various expanding (Show More) text boxes: https://support.wix.com/en/article/corvid-tutorial-creating-a-show-more-link
Suddenly, on one of my pages, no matter what I do, there’s this inexplainable large space between the text box when it’s NOT collapsed and the Show More button. I’ve tried moving the button to line up with the text box as well as removing the paragraph breaks within the text box and neither worked. Any thoughts? Below is the page code.
let fullText1; // variable to hold the full text
let shortText1; // variable to hold the short version of the text
$w.onReady( function () {
// how many characters to include in the shortened version
const shortTextLength = 196;
// read the full text and store it in the fullText variable
fullText1 = $w(“#text1”).text;
// grab the number of characters defined in shortTextLength and store them in the shortText variable
shortText1 = fullText1.substr(0, shortTextLength) + “.”;
// set the contents of the text element to be the short text
$w(“#text1”).text = shortText1;
});
export function button6_click(event) {
// check the contents of the text element
if ($w(“#text1”).text === shortText1) {
// if currently displaying short text, display the full text
$w(“#text1”).text = fullText1;
$w(“#button6”).label = “Show Less”;
} else {
// if currently displaying full text, display the short text
$w(“#text1”).text = shortText1;
$w(“#button6”).label = “Show More”;
}
}