[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

Not want transparent background...

Hi!

Have this page:
http://www.gaardsand.no/Artiklergaard.htm

If you try to focus with the mouse over:
41010       ANDEPØLSE, 5x1kg       ca 5,00       48       KG       Melk og sulfitt       

Les mer... -> show a textbox, but text under is shown in the box ?
How can i fix this ?

0
team2005
Asked:
team2005
  • 5
  • 5
  • 2
1 Solution
 
McOzCommented:
In your CSS (tested and works in IE8):

Change:
.ToolTextHover {
	POSITION: relative
}

Open in new window

To:
.ToolTextHover {
	Z-INDEX: 1; 
         POSITION: relative
}

Open in new window


The z-index will make these other labels stay behind the tooltip span.

Cheers
0
 
Roman GhermanCommented:
Agree,

change
.ToolTextHover
{
 position:relative;
 z-index: 1;
}
0
 
team2005Author Commented:
Hi!

Cant use this, not a good solution
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Roman GhermanCommented:
Why you can't use this?

isn't it working?
0
 
McOzCommented:
team2005,
the solution that I supplied is the best answer to your question. Unless it does not work, it is by far the simplest way to resolve the issue, which is not really about transparency of the tooltip span, but simply the order of elements. Without the z-index, the other labels end up in FRONT of the tooltip by default.

Let me know what the issue is, and we will see what can be done.

Thanks
0
 
team2005Author Commented:
Want the same effect that i have now, but the text under the tooltip
must not bee shown in this tooltipbox.

Maby use the same effect as with the pictures.
Use the same effect as the picture. But only show text..
Is that possible ?
0
 
McOzCommented:
Like this? screen capture
0
 
team2005Author Commented:
Yes, but now expand the row...
0
 
McOzCommented:
team, thanks for getting back to me. The image above was achieved using the method I showed you above (adding z-index:1 to the CSS definition).

I'm not quite sure what you mean by "expand the row", you would be welcome open another question to deal specifically with that, as it seems to go beyond the scope of this question.

Best regards,
Oz
0
 
team2005Author Commented:
Hi!

Want the same effect as used on the pictures.
But must use text only, and not picture.
How to do this ?
0
 
McOzCommented:
OK, its a little more involved, but here goes:

1) Do the CSS change pointed out above (set z-index of labels to 1). This must be done, or they will always be on top.

2) in your js, change the following functions:
Replace
function showtrail(width,height,file)
{
if(navigator.userAgent.toLowerCase().indexOf('opera') == -1 && navigator.userAgent.toLowerCase().indexOf('safari') == -1)
{
w=width
h=height
// followmouse()
gettrailobj().visibility="visible"
gettrailobj().width=w+"px"
gettrailobj().height=h+"px"
document.getElementById('ttimg').src=file
document.onmousemove=followmouse
}
}

Open in new window

With
function showtrail(width,height,file)
{
if(navigator.userAgent.toLowerCase().indexOf('opera') == -1 && navigator.userAgent.toLowerCase().indexOf('safari') == -1)
{
w=width
h=height
// followmouse()
gettrailobj().visibility="visible"
gettrailobj().width=w+"px"
if(file.match(/^htt.*:\/\/|^\//))
{
gettrailobj().height=h+"px"
document.getElementById('trailimageid').innerHTML='<img id="ttimg" src="'+file+'">'
}else{
gettrailobj().height="auto"
document.getElementById('trailimageid').innerHTML='<div class="trailText">'+file+'</div>'
}
document.onmousemove=followmouse
}
}

Open in new window


And replace
function hidetrail()
{
document.onmousemove=""
document.getElementById('ttimg').src='img/s.gif'
gettrailobj().visibility="hidden"
gettrailobj().left=-1000
gettrailobj().top=0
}

Open in new window

With
function hidetrail()
{
document.onmousemove=""
gettrailobj().visibility="hidden"
gettrailobj().left=-1000
gettrailobj().top=0
}

Open in new window


3) then, add a CSS class to define how the tooltip should look (you can adjust this):
.trailText {
   padding: 10px;
   color: red;
   background: white;
}

Open in new window


4) finally, change the onmouseover and onmouseout attributes of all the tooltip labels to this:
onmouseover="showtrail(300,500,this.childNodes[1].innerHTML);" onmouseout="hidetrail();"

Open in new window


Good luck, this is tested and works in FF 4, and should work in most other browsers as well.
0
 
team2005Author Commented:
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now