How to make kendo tooltip content legal

I have a kendo tooltip that displays when I hover over a line in the kendo grid. The tooltip content has several lines. Lines are displayed centered by default, while I would like them to be displayed on the left.

    rowTable.kendoTooltip({
                               content: textToBeDisplayed,
                               position: "bottom"
                           });
+4
source share
3 answers

You can override the .k-tooltip-contentCSS class .

 .k-tooltip-content {
        text-align:left;
    }

See this jsFiddle example

+6
source

For those of you who don't want to override the css class. I added a “built-in” style to the content.

.Content("<div style='text-align:left;'> " + myContent + "</div>")
0
source

Codingbadger , , .

, : http://jsfiddle.net/NameGrey/d4b0ez4n/5/

$(document).ready(function() {
  $("#target").kendoTooltip({
    position: "right",
    width: "200px",
    content: "<div class='my-tooltip'>Tooltip content with <b>solid example</b></div>"
  });
});

Css:

.my-tooltip {
    text-align: left;
  font-size: 20px;
}
0
source

Source: https://habr.com/ru/post/1583809/


All Articles