At this time, we currently don't have the option to add CSS styles directly to 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 questionnaire.
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:
When you preview your page, you will see the result.