This code will let you write CSS code to change the layout of a page.
At this time, we currently don't have an option to add CSS styles directly in the page. Of course, we can use the general CSS style at the design tab in Survey, but these styles will be applied to the whole questionairee.
I've found a way to add CSS styles for the current page with the following javascript code.
Open your Javascript editor and paste the following code.
// Variable to save your stylesvarstyles=` // Add your styles here`;// Create a style DOM nodevarstyleSheet=document.createElement("style");// Add the styles to the stylesheetstyleSheet.innerText=styles;// Append the stylesheet in the head of the HTML codedocument.head.appendChild(styleSheet);
Inside var styles = ``, write your custom styles. These will affect only the current page.
For example, if you want to set the background color to gray, you can use something like this:
Fig 1. Adding snippet to set custom CSS styles
and then, when you preview your page, you will see the result.