CSS tooltip getting cut off

I have a CSS tooltip that is being cut off when the hovered item is too close to the edge of the content area. See the links towards the bottom of this post: http://blog.betbright.com/top-stories/manchester-united-v-club-brugge-betting-preview/

Here is the code I'm using for the tooltip:

a.tooltip {
  position: relative;
  display: inline;
}
a.tooltip span {
  position: absolute;
  width:110px;
  color: #FFFFFF;
  background: #00A1E0;
  height: 30px;
  line-height: 30px;
  text-align: center;
  visibility: hidden;
  border-radius: 6px;
}
a.tooltip span:after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  width: 0; height: 0;
  border-top: 8px solid #00A1E0;
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
}
a:hover.tooltip span {
  visibility: visible;
  opacity: 1;
  bottom: 30px;
  left: 100%;
  margin-left: -76px;
  z-index: 999;
}

Any solutions you can recommend to stop the tooltip being cut would be appreciated.

Thanks, Paul

Answers


You should set the overflow property on your .entry-content class to visible instead of hidden. Your current setting hides everything that does not fit within that div. Since your tooltip would be displayed partly outside your .entry-content div, a part is cut of unless you change the overflow property. So, your error is not in the tooltip, it's in a parent element.


Need Your Help

How to set weight of column widths in GXT?

gridview gxt ext-gwt

Is it possible to set the 'weight' of columns on a Grid in GXT? If so, how?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.