Replies: 1 comment
-
Hi @rmtham, I'm not sure, but I wonder if your CSS rule isn't working because it's selecting the If that is the problem - there might be a way to write a CSS selector for an element that has a specific child element, but I'm not sure how to do that. So one solution would be to write some JavaScript to change the You could also try using the CSS classes parameter to modify the overflow properties specifically for your demographics trial. IIRC, this class is applied to .scrollbars #jspsych-display-element {
/* CSS rules to show scroll bars etc. */
} And var demographics_trial = {
// other parameters
css_classes: ['scrollbars']
} I hope that helps. Let us know if you need any further guidance. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I had a question about CSS formatting for jsPsych.
In jspsych.css, I noticed that when I add
overflow-y: hidden;
andoverflow-x: hidden;
to.jspsych-display-element
, it works beautifully and all the excess vertical and horizontal scrollbars disappear during the experiment:However, this also eliminates the vertical scrollbar in the demographics form at the beginning of the experiment, which is a jsPsych
‘external-html’
trial type. (This makes sense, because based on my understanding of jsPsych CSS, any rules specified in .jspsych-display-element applies to the entire experiment).I was playing around with the CSS formatting for the demographics form, and so far I have tried:
and adding .jspsych-display-element to specify that I would like to change a specific jsPsych element:
However, I have not been able to get the vertical scrollbar to display only for the demographics form.
I was wondering if anyone has any pointers or potential solutions for how to solve this formatting issue? Any help would be much appreciated :)
(As a side note, I have two CSS sheets -- one is the
jsPscyh.css
and the other is the style.css, which contains the CSS for the demographics form. ThejsPsych.css
script is referenced before the style.css script inindex.html
.)Beta Was this translation helpful? Give feedback.
All reactions