Welcome, Guest
Username: Password: Remember me

TOPIC: Adressing a specific Question

Adressing a specific Question 1 year 5 months ago #88088

  • Freya
  • Freya's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 0
Hello there,
for my survey I'd like to replace they Answertext of an array with an image to keep the radiobuttons as small as possible.
When I'm placing the image into question.pstpl it appears globally for all questions. But the problem is, that there aren't only array questions, so the image sometimes is misplaced.


With some advice from Mazi and searching in the forum I figured that one can adress a specific question.
I tried to put a code at the end of template.css, leaving out the part with the image, just to see, if the question is targeted.:
#question276 {
text-align: center;
}
But nothing happened...

Could you please help me to see where am I doing wrong?

Heres is my activated survey in short form:
survey.metrik.de/index.php/survey/index/sid/398457/lang/de
Attachments:
Last Edit: 1 year 5 months ago by Freya.
The administrator has disabled public write access.

Re: Adressing a specific Question 1 year 5 months ago #88104

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 3837
  • Thank you received: 688
  • Karma: 330
It appears that you may be using a copy of a very old template that does not assign the appropriate classes to the questions.

You will need to wrap the contents of your question.pstpl in a <div> element like this (have a look at the shipped templates):
<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}">
    <!-- Your existing question.pstpl code here -->
</div>
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 1 year 5 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: Freya

Re: Adressing a specific Question 1 year 5 months ago #88106

  • Freya
  • Freya's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 0
Ah I see.
I tried but still nothing happened, even when i changed everything to a shipped (copy of basic) template.
Do I have to add something like .array2 ?
The administrator has disabled public write access.

Re: Adressing a specific Question 1 year 5 months ago #88107

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 3837
  • Thank you received: 688
  • Karma: 330
I tried but still nothing happened...
Sure it does. Try this:
#question276 table.question {
	background: transparent url(http://www.metrik.de/fileadmin/templates/metrik/images/klemme.png) right 0 no-repeat; 
} 
#question276 table.question thead th {
	height:80px; 
}

Capture_2012-11-12.JPG
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: Freya

Re: Adressing a specific Question 1 year 5 months ago #88126

  • Freya
  • Freya's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 0
Uhh thanks a lot! :)
The administrator has disabled public write access.

Aw: Re: Adressing a specific Question 1 year 5 months ago #88271

  • Freya
  • Freya's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 0
Since you are so nice to help me I have another question you may help me with but I don't want to open a new thread.
I tried for hours to get the attached image behind the welcome message. When I insert it into the welcome text it only appears below the welcome text and this looks bad.

I think there is an easy way to do this but I'm only beginning to learn handling CSS and limesurvey...

survey.metrik.de/index.php/survey/index/sid/398457/lang/de

Any help would be very appreciated. :)
Attachments:
Last Edit: 1 year 5 months ago by Freya.
The administrator has disabled public write access.

Re: Adressing a specific Question 1 year 5 months ago #88307

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 3837
  • Thank you received: 688
  • Karma: 330
You will need to insert it as a background image - www.w3schools.com/cssref/pr_background-image.asp.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Adressing a specific Question 1 year 5 months ago #88328

  • Freya
  • Freya's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 20
  • Karma: 0
I tried this before but if I insert this into body the picture only appears behind the box the welcome text is in.

I'd like to have it behind the message "Willkommen zu dieser Beispielumfrage.Sie sollten viel Spass dabei haben!Diese Umfrage enthält 10 Fragen.".
I don't know where to put background-image:url(''); for this case.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.114 seconds
Donation Image