Character Limit in Hover Box | XM Community
Solved

Character Limit in Hover Box

  • 11 April 2018
  • 7 replies
  • 215 views

I have a question that requires an additional definition, and I have it coded so that when you hover over a word, you see additional text. However, the hover text box is not big enough to display my whole definition. It seems to be related to character count. Is there a way to make the box bigger or allow more characters? Thanks!
icon

Best answer by TomG 12 April 2018, 00:07

View original

7 replies

Userlevel 4
Badge +5
Could you post the code you have so far? I'd be happy to take a look.
Terrific - thank you!! Below is an example of what I'm using. In this example, the question would read "How is your day going?". The word "day" would be in blue, and when you hover over it, you would see "the 24 hour span between yesterday and tomorrow".

My help text ("the 24 hour span...") is actually 544 characters with spaces. It seems that the text box will show about 507 characters.

Example:
How is your <span" style="color: blue;" title="The 24 hour span between yesterday and tomorrow.">day</span"> going?
Userlevel 7
Badge +27
This is browser dependent, but 544 is too long for the title attribute. You'll have to move your text from title attribute to html and use css to format. Do a search on "css tooltip".
Thanks Tom! That's unfortunate but crystal clear! I have to do this in many languages. I'm wondering if there is a way to show a graphic when I hover over the text instead?
Userlevel 7
Badge +27
@AmyHall,

You can't put images in the title attribute. If you use css tooltips, you can put anything you want in a tooltip including images.
Userlevel 7
Badge +38
@AmyHall , I would check how hovering works on mobile too. It doesn't seem that I can hover on my iPhone so there is potentially a decent portion of your respondents who won't be able to see those instructions. If you have this same issue, you should consider hard coding the instruction into the question wording so that everyone sees it.
Userlevel 7
Badge +27
Generally, on a mobile device you can usually tap on the hover link and it will reveal the tooltip. Then tap off it and it goes away.

Leave a Reply