I have the following Fiddle in which I am trying to add a border around the triangles on the tooltips. I thought I could do it with a box shadow, but can’t seem to work it out. Basically I would like to have the black border continue over the point of the triangle, but not under it if that makes sense?
I’m just on my way out but I usually do the arrow like this:
I use a square rotated 45 degrees to get the arrow effect and then cut it off with clip. You need a background color to cover the original line so you need to match contexts etc.
It would take a little while to implement that into your code as you have many variations in there but it would work.
No, sorry, all of these complex overlays to the simple basics of web design make things easier! Don’t you get it?! And simplicity is just so … uncool, you know?
Many thanks for the reply and the examples! They look great. However, I am wondering how I can have the tooltips kind of appear/fade in near the actual element rather than from the far side of the page?
That works great. However I noticed one thing - if I move my mouse down slowly from the link into the tooltip, it disappears. I guess there is a pixel margin or two that is in between the link and the tooltip. Is there a way I can stop it from disappearing/hidden when hovering in that “empty” area? I have tried adding pointer-events: all, but this then makes it appear when hovering under the actual link.
If you reset the pointer events to initial on hover it will work as per the original version except there is a gap between the tooltip and the link which is why it loses focus unless you are quick (which is happening in the original also).
You could shim a pseudo element above the tooltip to keep it active.
I’ve updated the codepen to show the effect.