Solved

Not want transparent background...

Posted on 2011-03-24
12
283 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
Technology Partners: 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!

 
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

707 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