π Add custom CSS to page
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 styles
var styles = `
// Add your styles here
`;
// Create a style DOM node
var styleSheet = document.createElement("style");
// Add the styles to the stylesheet
styleSheet.innerText = styles;
// Append the stylesheet in the head of the HTML code
document.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:

and then, when you preview your page, you will see the result.

Last updated
Was this helpful?