)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to overcome the positioning issue of Tooltip when the material theme is enabled

Platform: jQuery |
Control: ejTooltip |
Published Date: June 23, 2017 |
Last Revised Date: May 7, 2019

Solution:

All Syncfusion Essential JS widgets are developed with a unique theme and different styling effects to improve its appearance and to have the unique look and feel. To apply material themes, please refer the following link.

Themes: https://help.syncfusion.com/js/theming-in-essential-javascript-components

When the material theme is enabled, the tooltip wrapper is shown with the animation effect.

Due to this effect, the position of the tooltip is overlapped with the target element as below.

 

tooltip

To overcome with this issue, you can specify the gap between the tooltip wrapper and the target element by using “Tip” property as below.

 

<div class="frame" id="custom">
  <div class="image">
 <img id="tooltipimg" alt="Python Succinctly" >
   </div>
 <div class="desc">Python Succinctly</div>
 </div>  
</div>
 
<script type="text/javascript">
 
$("#custom").ejTooltip({
 
            content : "Learn to use the Python language to create programs of all kinds to creating practical applications.",
 
             tip :{
         adjust : {xValue : 12, yValue: 6}
       }               
});
 
</script>

 

Tip.adjust property used to specify the gap between tooltip wrapper and target element. So, the tooltip wrapper won’t be overlapped with the target element.

 

tooltip

 

<style class="cssStyles">
 
        .frame{
         box-sizing: border-box;
         border: 1px solid #ccc !important;
         border-radius: 0px;
         padding: 0px;
         text-align: center;
         width : 160px;
        }
        .frame img{
         width : 100%;
        }
        @media (max-width: 440px){
         .frame{
          width : 160px !important;
         }
        }
        .circle {
     
      color: white;
      background: #1dabce;
      border-radius: 10px;
      padding: 2px;
     }
        .image{
         background-color: #ccc;
        }
        img{
         padding-top: 8px;
        }
 
    </style>

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon