- Posts: 153
- Thank you received: 8
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
align pictures after text in the same line
- KompetenzZ
- Topic Author
- Offline
- Premium Member
Less
More
7 years 3 weeks ago #151210
by KompetenzZ
Cheers kompetenzz
align pictures after text in the same line was created by KompetenzZ
Hello,
I try to align the images in the answer options in the center, or still better with "margin-right: ...em", but I don't know how. I don't would like to use space because it is imprecise (and I also would have to insert spaces in the translation for other languages). I tried to do it with css but I don't know what exactly to write there to define classes.
I also tried "text-align: center", but it places the whole line in the center and I would need something which only moves the images, without the text, staying in the same line. See picture.
I try to align the images in the answer options in the center, or still better with "margin-right: ...em", but I don't know how. I don't would like to use space because it is imprecise (and I also would have to insert spaces in the translation for other languages). I tried to do it with css but I don't know what exactly to write there to define classes.
I also tried "text-align: center", but it places the whole line in the center and I would need something which only moves the images, without the text, staying in the same line. See picture.
Cheers kompetenzz
Attachments:
The topic has been locked.
- jacob
- Offline
- Senior Member
Less
More
- Posts: 75
- Thank you received: 22
7 years 3 weeks ago - 7 years 3 weeks ago #151219
by jacob
Replied by jacob on topic align pictures after text in the same line
Can you provide a test-link ?
So its easier to understand what you've done so far (template / css etc.).
So its easier to understand what you've done so far (template / css etc.).
Last edit: 7 years 3 weeks ago by jacob.
The topic has been locked.
- KompetenzZ
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 8
7 years 3 weeks ago #151241
by KompetenzZ
Cheers kompetenzz
Replied by KompetenzZ on topic align pictures after text in the same line
Here is the testlink, it's the second question:
survey.toscani.at/index.php/533211?lang=de
(sorry for the German language in the survey)
Thank you
survey.toscani.at/index.php/533211?lang=de
(sorry for the German language in the survey)
Thank you
Cheers kompetenzz
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11637
- Thank you received: 2737
7 years 3 weeks ago #151244
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic align pictures after text in the same line
I would personally put the picture before the text. Which would also resolve your problem.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- jacob
- Offline
- Senior Member
Less
More
- Posts: 75
- Thank you received: 22
7 years 3 weeks ago - 7 years 3 weeks ago #151245
by jacob
Replied by jacob on topic align pictures after text in the same line
you can add
to your css/template.css (template_editor).
BUT be carefull all other pictures will also have that float. So maybe you have to adjust other img with inline css. (float: none).
And i also agree with holch. I think pictures before text would be better.
hope it helps
jacob
Code:
img{ float: right; }
BUT be carefull all other pictures will also have that float. So maybe you have to adjust other img with inline css. (float: none).
And i also agree with holch. I think pictures before text would be better.
hope it helps
jacob
Last edit: 7 years 3 weeks ago by jacob.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
7 years 3 weeks ago #151256
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic align pictures after text in the same line
The float right may work, if text isn't to long. But personally I wouldn't do it. Not sure how some browser display the stuff. I have not the Kompetenz to imaginejacob wrote: float: right;jacob
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Attachments:
The topic has been locked.
- KompetenzZ
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 8
7 years 3 weeks ago - 7 years 3 weeks ago #151257
by KompetenzZ
Cheers kompetenzz
Replied by KompetenzZ on topic align pictures after text in the same line
I see, the code is executed for all pictures. Thats a pitty, is there any possibility use the float only for this page? Otherwise the logo and other pictures will be misaligned.
I guess with defing classes, but I don't know how...
Placing the picture before the text is not an option for me in this case.
I guess with defing classes, but I don't know how...
Placing the picture before the text is not an option for me in this case.
Cheers kompetenzz
Last edit: 7 years 3 weeks ago by KompetenzZ.
The topic has been locked.
- jacob
- Offline
- Senior Member
Less
More
- Posts: 75
- Thank you received: 22
7 years 3 weeks ago #151272
by jacob
Replied by jacob on topic align pictures after text in the same line
yeah sorry,
big mistake there...
define id's (or classes) for your images like
<img alt="" id="myID_123456" src="/upload/surveys/123456/images/1.jpg" style="width: 198px; height: 256px;" />Bild 1
Then you can customize the appearance of your images.
with:
#myID_123456{
myCSS: xyz;
}
maybe that will work
big mistake there...
define id's (or classes) for your images like
<img alt="" id="myID_123456" src="/upload/surveys/123456/images/1.jpg" style="width: 198px; height: 256px;" />Bild 1
Then you can customize the appearance of your images.
with:
#myID_123456{
myCSS: xyz;
}
maybe that will work
The following user(s) said Thank You: KompetenzZ
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
7 years 3 weeks ago - 7 years 3 weeks ago #151276
by jelo
You can add float via the GUI of the image properties as well.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic align pictures after text in the same line
I added the float only to the images in my screenshot example.KompetenzZ wrote: Thats a pitty, is there any possibility use the float only for this page?
You can add float via the GUI of the image properties as well.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Attachments:
Last edit: 7 years 3 weeks ago by jelo.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- KompetenzZ
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 153
- Thank you received: 8
7 years 3 weeks ago - 7 years 3 weeks ago #151318
by KompetenzZ
Cheers kompetenzz
Replied by KompetenzZ on topic align pictures after text in the same line
Thank you Jelo, but this GUI is not the same because I can't align the picture in center in this case.
However, at the end I would like to place the answer option "chopped straw" at the top of the second column. I set "Display columns: 2", but I can't change the division of the columns. I would need 5 answer options in the first column and 6 answer options in the second column (to avoid white space after the "Other" answer option). See picture.
However, at the end I would like to place the answer option "chopped straw" at the top of the second column. I set "Display columns: 2", but I can't change the division of the columns. I would need 5 answer options in the first column and 6 answer options in the second column (to avoid white space after the "Other" answer option). See picture.
Cheers kompetenzz
Attachments:
Last edit: 7 years 3 weeks ago by KompetenzZ.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11637
- Thank you received: 2737
7 years 3 weeks ago #151331
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic align pictures after text in the same line
This won't work. Limesurvey will always devide this way, more responses in the first columns than in the last, if it is uneven. This works absolutely fine in 99% of the cases. Now in your case it is also no problem, but rather a visual inconvenience. I wouldn't spent tooooo much time on these details. At the end of the day they don't really matter.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.