Check out the LimeSurvey source code on GitHub!

CSS list item display - doesn't work??

More
4 years 11 months ago #76834 by Melarish
I'm trying to make all answer choices appear on a new line. So I added this bit to the Question Page template:

li {
display: block;
}

...but it's not working and they're still all on one line. On smaller resolutions, it doesn't fit on one line and it looks confusing.



In the source, the answer options appear as:
<li>
<input class="radio" type="radio"/>
<label for="answer91296X309X429PS" class="answertext">Probably Same</label>
</li>

and if I add display:block to the answertext class or label, then it puts the radio button and label on different lines -_-

I'm very inexperienced with CSS, so I'm not sure what to do. The template file is really huge too :/
Attachments:

Please Log in to join the conversation.

More
4 years 11 months ago #76840 by DenisChenu
Hello,

By default, with default template, each button radio are on a new line. Set "Display columns" advanced setting to 1.

:)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
4 years 11 months ago - 4 years 11 months ago #76852 by Melarish
But it's already set to 1 :unsure:

I'm not using the default template though; it's something my coworker must have found somewhere (she doesn't know CSS).

Here's a screenshot of the template if anyone recognises it:




Or the zip file:

File Attachment:

File Name: xxxxxx.zip
File Size:46 KB
Attachments:
Last Edit: 4 years 11 months ago by Melarish.

Please Log in to join the conversation.

More
4 years 11 months ago #76856 by c_schmitz
Looks like the default template. Rather use that one.

Best regards

Carsten Schmitz
LimeSurvey project leader

Please Log in to join the conversation.

More
4 years 11 months ago #76922 by tpartner
Yes, that template is very similar to the default template so it may be best to use that.

However, if you do need to use that template, remove lines 1202-1222 of template.css. In other words, remove this:
.list-radio ul {
margin-left:0;
margin-top:0.5em;
padding-left:0;
text-align:left;
}
 
.list-radio ul li {
display: inline;
padding: 0 2em 0 0;
margin-left: 0;
}
 
.list-radio .answer li label {
display: inline-block;
width: auto;
}
 
.list-radio td.answer {
padding-bottom:10px;
}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Melarish

Please Log in to join the conversation.

More
4 years 11 months ago #77046 by Melarish
Removed that code and it still shows exactly the same :(

Please Log in to join the conversation.

More
4 years 11 months ago #77047 by tpartner
Did you clear your cache? Try another browser?

Can you activate a sample survey for us to see?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
4 years 11 months ago #77048 by Melarish
Sorry; I forgot to refresh the page after going there again :blush: . Yes, it works now! Thanks so much for your help!! :cheer:

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form