I am using the default template for a very simple survey that has all questions as mandatory. In the template on some questions the asterisk is inline before the question (the way I want it). On other questions the asterisk is on its own line with the question below it.
The difference seems to be random. Some are inline and some are not. Is there a way to control this and have the asterisk inline?
No. I tried with the same long free text and with short free text--got the same outcome. The length of the question and the question type don't seem to make any difference. I looked to be sure there was no additional space or errant line break in the html code also. I looked in the manual but have not been able to locate where this is addressed.
Indeed. The one's that were inline had no <p> tag. The one's that had the asterisk on a separate line had the <p> tag. I removed the paragraph tags (both open <p> and closed </p>) and all now are consistent. You saved me tons of time trying to sort this out.
I see that this is an oddity in the program or theme that it puts the asterisk on its own line when using standard paragraph tags. So I must not be the only one who has encountered this.
The problem is that the asterisk is inserted at the template level (question.pstpl), not by the editor so there is no way of knowing what HTML elements will be in the question text.
<p> elements are block elements so will be rendered with a preceding line-break.
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
tpartner wrote: I use a JavaScript workaround like ....
Why not with float:left css ?
It work on 2.6 version and 3.0 version.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
@Joffm : i'm not OK about display: inline : if user use 'enter' key : he want to see some line between paragraph .
You right on one point : sometimes it's an undesired behaviour :
Code:
<p>
</p>
Added at end of question text.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
Last edit: 9 years 9 months ago by DenisChenu. Reason: html4strict code