Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Not want transparent background...

Posted on 2011-03-24
12
Medium Priority
?
293 Views
Last Modified: 2012-06-27
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
Comment
Question by:team2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
12 Comments
 
LVL 9

Expert Comment

by:McOz
ID: 35206324
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
 
LVL 9

Expert Comment

by:Roman Gherman
ID: 35206370
Agree,

change
.ToolTextHover
{
 position:relative;
 z-index: 1;
}
0
 
LVL 2

Author Comment

by:team2005
ID: 35208048
Hi!

Cant use this, not a good solution
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Expert Comment

by:Roman Gherman
ID: 35208102
Why you can't use this?

isn't it working?
0
 
LVL 9

Expert Comment

by:McOz
ID: 35208172
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
 
LVL 2

Author Comment

by:team2005
ID: 35208240
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
 
LVL 9

Expert Comment

by:McOz
ID: 35208311
Like this? screen capture
0
 
LVL 2

Author Comment

by:team2005
ID: 35208530
Yes, but now expand the row...
0
 
LVL 9

Expert Comment

by:McOz
ID: 35208577
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
 
LVL 2

Author Comment

by:team2005
ID: 35213253
Hi!

Want the same effect as used on the pictures.
But must use text only, and not picture.
How to do this ?
0
 
LVL 9

Accepted Solution

by:
McOz earned 2000 total points
ID: 35258961
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
 
LVL 2

Author Closing Comment

by:team2005
ID: 35400262
thanks
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question