# Tooltip with css\_tt

**URL:** <https://www.ruby-forum.com/t/tooltip-with-css-tt/196023>\
**Category:** Ruby\
**Created:** [October 5, 2010, 4:31pm UTC](https://www.ruby-forum.com/t/tooltip-with-css-tt/196023 "2010-10-05T16:31:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [October 5, 2010, 4:31pm UTC](https://www.ruby-forum.com/t/tooltip-with-css-tt/196023/1 "2010-10-05T16:31:36Z")

</div>

Using “css\_tt” gem, I was able to create a tooltip.  
However, my text (of the tooltip) has many “  
”.

Here’s my view:

\<% @tooltip = "Whatever   
 This is just an example  
I need many break lines  
 Got it?" %\> \<%= css\_tt("Tooltip:", @tooltip, :title =\> "My title") %\>

In my computer, the tooltip shows a cute text, WITH the break lines.  
However, when I try to run the project in ANOTHER computer, instead of  
break lines, i get the “  
” that I’ve wrote…

Someone knows what can it be?

---

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [October 5, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/tooltip-with-css-tt/196023/2 "2010-10-05T16:52:18Z")

</div>

On 10/5/2010 9:31 AM, Bla … wrote:

> Got it?" %\>  
> \<%= css\_tt(“Tooltip:”, @tooltip, :title =\> “My title”) %\>
> 
> In my computer, the tooltip shows a cute text, WITH the break lines.  
> However, when I try to run the project in ANOTHER computer, instead of  
> break lines, i get the “  
> ” that I’ve wrote…
> 
> Someone knows what can it be?

I’m not a CSS/HTML expert, but are you testing with the same version of  
the same browser on both computers? If not, this may be explained by  
incompatible differences between the browsers in question.

I wish I could posit a solution. Have you tried using \n instead of  
  
?

-Jeremy

---

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [October 6, 2010, 1:30pm UTC](https://www.ruby-forum.com/t/tooltip-with-css-tt/196023/3 "2010-10-06T13:30:56Z")

</div>

Thanks for the answer.

I’ve tried to use “\n” instead of “  
”. But it doesn’t work in any  
computer, even mine.

There’s some way to I force the browser to compose the way I want to?

---

<div class="post-metadata">

**Author:** ![upabibi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/e19adc/32.png) [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Post date:** [October 6, 2010, 5:51pm UTC](https://www.ruby-forum.com/t/tooltip-with-css-tt/196023/4 "2010-10-06T17:51:54Z")

</div>

On 10/6/2010 6:31 AM, Bla … wrote:

> Thanks for the answer.
> 
> I’ve tried to use “\n” instead of “  
> ”. But it doesn’t work in any  
> computer, even mine.
> 
> There’s some way to I force the browser to compose the way I want to?

This doesn’t appear to be a general Ruby problem, so this is probably  
not the best forum in which to pose this question. Have you tried  
contacting the author of the css\_tt gem? Since css\_tt advertises itself  
for use with Rails, you might also try asking in that list:

[http://www.ruby-forum.com/forum/3](http://www.ruby-forum.com/forum/3)

Maybe someone there will have some experience with this gem.

-Jeremy
