Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

add shading and tooltips

  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago - 3 years 2 weeks ago #221190 by xiaomeng0603
add shading and tooltips was created by xiaomeng0603
Dear all:

I have 2 questions. 

Q1: is it possible to add shading on the array(number) on LimeSurvey? That means making the background color full of the cell (shading). Now ​the table in this question is like this(1.jpg)
 

I prefer it could be that the first row is full of shading like the following picture(2.jpg).
 

Q2: I want to add a tooltip to my design.There are two ways.
First:
Is it possible to add a (?or !) they can click to show them the definition? It is like the function shown on the right side of the LimeSurvey Website(the following two pictures 3.jpg and  4.jpg are screenshots from LimeSurvey). I would like to use this way in my public survey. For example, I like cola[!/?]. When the respondent moves the arrow to [!/?], they can know the definition of the cola.
   

 Second:
The following link is the java code about tooltip( getbootstrap.com/docs/3.3/javascript/#popovers ).According to the tutorial, the word which I want to explain has to show in the button(following picture). That is not what I want.  Could you help me delete the limit of button style or others, make the "cola" normal(5.jpg)?   


I prefer the following picture (6.jpg)which screenshots from the example part of the link( getbootstrap.com/docs/3.3/javascript/#popovers )


The file is attached. 

File Attachment:

File Name: limesurvey...T111.lss
File Size:23 KB


Thank you
 
Last edit: 3 years 2 weeks ago by xiaomeng0603.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #221195 by Joffm
Replied by Joffm on topic add shading and tooltips
Hi,
To answer your first question:
Use a webdevelopment tool that is included in each browser and check which classes are affected.
Code:
.table-bordered>thead>tr>th { ​
​​​​​​   background-color:red;
}

 
And to answer your second question.
Just scroll down a bit in your shown link to the "Markup" section
[url] getbootstrap.com/docs/3.4/javascript/#markup-1 [/url]

Here an example with tooltip and popover
 


Code:
<a data-container="body" data-toggle="tooltip" date-html="true" href="#" title="Größte in Deutschland heimische Art">Rossameise</a> oder doch eine <a data-content="Diese Arten sind alle kleiner als die Rossameise" data-html="true" data-placement="top" data-toggle="popover" data-trigger="focus hover" href="#" role="button" tabindex="0" title=" "> andere Art?</a> 
 
<script>
$('[data-bs-toggle="popover"]').popover();
$('[data-bs-toggle="tooltip"]').tooltip();
</script>

And you may use the fontawesome icons instead of text. Here a modal dialog that shows a wikipedia page
 
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #221204 by xiaomeng0603
Replied by xiaomeng0603 on topic add shading and tooltips
Thanks for your help. The second question has been addressed, but I am not very clear about the first one.
I copy this code in the source directly, while, not working. Do I need to download a webdevelopment tool at first?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago - 3 years 2 weeks ago #221207 by holch
Replied by holch on topic add shading and tooltips
Each modern browser has a tool that is meant for webdevelopers and is usually called so. You open it and it allows you to analyze the site you have currently open. This way you can check how specific elements of your website or in this care your survey are addressed in HTML and CSS. With this information, you can write your CSS code accordingly, to format cells, text, etc.

The code Joffm uses might not work for you, because your template/theme might be different to his, so you will need to identify the element you want to change in YOUR theme/template and write the CSS code accordingly.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 3 years 2 weeks ago by holch.
The following user(s) said Thank You: xiaomeng0603
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #221210 by Joffm
Replied by Joffm on topic add shading and tooltips
Hi,
it works in "vanilla" and "fruity". And you did not mention the theme you are using.
BUT:
Did you surround the code with <style></style>?
Did you copy the code? You shouldn't have done that.
I copied it from the development tool. So it contains some HTML garbage.


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • xiaomeng0603
  • xiaomeng0603's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #221212 by xiaomeng0603
Replied by xiaomeng0603 on topic add shading and tooltips
yes, it works. Thanks so much :)
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose