Welcome, Guest
Username: Password: Remember me

TOPIC: Insert picture to the left of the question

Insert picture to the left of the question 3 years 5 months ago #61795

  • asonimie
  • asonimie's Avatar
Is there a way to insert a picture to the left of the question instead of having to put a picture in the question text and the answers below it?

Sort of like having it in a table.

Ideally I'd like to be able to have a picture to the right or left and have 3 questions on a page, but even being able to have one question on the page with the image to the right or left would be helpful.
Attachments:
The administrator has disabled public write access.

Re: Insert picture to the left of the question 3 years 5 months ago #61813

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4371
  • Thank you received: 829
  • Karma: 381
You can place the image in a text-display (boilerplate) question and then use CSS to place the follwing questions alongside.

Here are some quick styles for the default template to give the result below. Replace the following:
11 - boilerplate question ID
22 - multiple options question ID
33 - multiple text question ID
44 - the question ID of the next question in the group (if any)
table.innerframe {
	width: 800px;
}
 
#question11,
#question22,
#question33 {
	float: left;
}
 
#question11 {
	width: 40%;
	margin-left: 5%;
}
 
#question22,
#question33 {
	width: 50%;
	background-color: #EEF6FF;
	padding-right: 10px;
}
 
#question22 .questiontext,
#question33 .questiontext {
	 padding: 1em;
}
 
#question33 {
	margin-top: -12px;
	padding-top: 14px; 
}
 
#question11 table,
#question22 table,
#question33 table {
	width: 100%;
}
 
#question11 td.answer {
	padding: 0;
}
 
#question44 {
	clear: both;
}

Capture2_2011-06-03.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.

Re: Insert picture to the left of the question 2 years 6 months ago #79998

  • gfgardner
  • gfgardner's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
This looks like just what I need. But I am struggling a bit. Can you please clarify ..

Do I actually have to edit the template.css file to include the text you provided? exactly where do i put this (and actually if you dont mind can you tell me how to do this because my version of the template editor will not allow me to insert a line except at the end). Do I then have to keep this template just for this one survey?

then do I have to put in the template.css file the long code for the question 17328X272X190 etc for each of the questions I am interested in?

Like I said, it is just what I need and you have done a great job in providing the answer but I just need a little more and have done an FAQ search. Thanks
The administrator has disabled public write access.

Re: Insert picture to the left of the question 2 years 6 months ago #79999

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4371
  • Thank you received: 829
  • Karma: 381
...my version of the template editor will not allow me to insert a line except at the end...
You will need to copy one of the shipped templates before you can edit it.
Do I actually have to edit the template.css file to include the text you provided?
The code I supplied would go at the end of template.css.
Do I then have to keep this template just for this one survey?
You can use the template for other surveys. The added code will not affect them because it uses question-specific identifiers for the style rules (questions are identified with their IDs).
then do I have to put in the template.css file the long code for the question 17328X272X190 etc...
You do not use the full SGQA for the styles. In the case of your example, the identifier would be #question190.
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: gfgardner

Re: Insert picture to the left of the question 2 years 6 months ago #80023

  • gfgardner
  • gfgardner's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
screenshot.jpg

Many thanks for trying. I may have to give up, however, as I did all of that and still got the screenshot as attached. I also attach the css file which I think I copied accurately.

should I perhaps try a simpler way?

I did at least work out how to use the template editor - the problem was not that I had tried to edit an original it was that the fancy highlighting option was switched on and on my machine (ie9) made all sorts of flashing and moving around things happen until I switched it off.
Attachments:
Last Edit: 2 years 6 months ago by gfgardner. Reason: still trying to get the css file on
The administrator has disabled public write access.

Re: Insert picture to the left of the question 2 years 6 months ago #80024

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4371
  • Thank you received: 829
  • Karma: 381
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.

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: Insert picture to the left of the question 2 years 6 months ago #80034

  • gfgardner
  • gfgardner's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
actually (and miraculously) since doing the screenshot which you can see above produced a vertical set, I went and had a cup of coffee, and when I came back it was fine!

many thanks again.

Also for the benefit of complete newbies (and to get it in the forum search results because strangely it does not appear easily), the term boilerplate is used by everyone on this forum - How do I create a boilerplate survey, the answer is that it is actually called a text display question. Hope that helps
The administrator has disabled public write access.

Re: Insert picture to the left of the question 2 years 6 months ago #80038

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4371
  • Thank you received: 829
  • Karma: 381
the term boilerplate is used by everyone on this forum
Yeah, sorry, that's a legacy from earlier versions.

Yes, boilerplate = text display
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: Insert picture to the left of the question 2 years 6 months ago #80081

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
gfgardner wrote:
actually (and miraculously) since doing the screenshot which you can see above produced a vertical set, I went and had a cup of coffee, and when I came back it was fine!
When editing the template.css file, you always have to clear the browser cache when calling the page again so that the new code is loaded and no cached, outdated file.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.126 seconds
Donation Image