Remove extra spacing using Java | XM Community
Skip to main content
I am not very Java-savvy, but I know I can remove the extra space between questions by adding JavaScript to the question. I haven't done it for a while and cannot remember how. The example I am working on is having "blank" question text for a couple of question types below a descriptive text box. I'd like only the answerable parts to be closer to the descriptive text, instead of huge blank spaces between them.
This was actually discussed in a previous thread with @AlexB providing the following code: You can add this CSS into the Look & Feel (adjusting the last number in padding for the amount of space you want): .Skin .QuestionText { padding: 0 0 0px; }
That is CSS that would apply to the whole theme. I know it has something to do with QID#. I will comb through the threads again, maybe I missed it.
You can put CSS inside a `<style>` tag as part of a question's text and it will only apply to that page. Anyway, if you want to hide the Separators and the Question text for all but the first: ``` jQuery('.Separator').hide(); jQuery('.QuestionText').each(function(index) { if(index > 0) jQuery(this).hide(); }); ```