Solved

Not want transparent background...

Posted on 2011-03-24
12
264 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
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

809 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