Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
YUI Button shows through AutoComplete items div - z-index bug?   Message List  
Reply | Forward Message #30984 of 52125 |
Re: [ydn-javascript] YUI Button shows through AutoComplete items div - z-index bug?

sfcalvert,

The short answer is that the following rule will likely fix your problem:

.yui-skin-sam .yui-ac {z-index:100;}
(even 1 might solve the problem)

Here's what I think is happening:

IE has an interesting behavior with regard to z-index.  When IE compares z-indices of two positioned elements (e.g., position:relative) that do not have explicit z-index declarations, the element appearing later in the DOM always wins.  And this applies to the contents of those positioned elements also.

The yui-ac class, which wraps the input field and the suggestion container in AutoComplete, is position:relative and has no z-index (see http://developer.yahoo.com/yui/examples/autocomplete/ac_skinning.html for a peek at the Sam Skin CSS for AutoComplete).  No matter what you do with the z-index of your suggestion container (.yui-skin-sam .yui-ac-container), it will still appear beneath a positioned element appearing later in the page.  In your case, part of the Sam Skin CSS for Button declares position:relative (for IE) for a portion of the button's contents.  That portion of the button's contents lays on top of the AC suggestion container.

By ensuring that the highest-level positioned ancestor of your AC container has an explicit z-index greater than zero, you should resolve your problem.  And it's likely that the .yui-skin-sam .yui-ac declaration is that highest-level parent.  (If the fix above doesn't work, look for a positioned element that is an ancestor of your AutoComplete containter and that does not have a z-index.)

Regards,
Eric



______________________________________________
Eric Miraglia
Yahoo! User Interface Library



On May 14, 2008, at 11:56 AM, sfcalvert wrote:

I'm seeing this in IE 7, not in Firefox. When the autocomplete's items
div renders, I can see the YUI buttons through the div. Essentially I
can see the button text and the borders on the right and left sides of
the button, not the entire button. 

I've tried to set the z-index of the items div to 10000 or something
ridiculously large, but to no avail. Any ideas? Has anyone encountered
this before?




Thu May 15, 2008 2:13 am

ericmiraglia
Offline Offline
Send Email Send Email

Forward
Message #30984 of 52125 |
Expand Messages Author Sort by Date

I'm seeing this in IE 7, not in Firefox. When the autocomplete's items div renders, I can see the YUI buttons through the div. Essentially I can see the button...
sfcalvert
Offline Send Email
May 14, 2008
6:56 pm

sfcalvert, The short answer is that the following rule will likely fix your problem: .yui-skin-sam .yui-ac {z-index:100;} (even 1 might solve the problem) ...
Eric Miraglia
ericmiraglia
Offline Send Email
May 15, 2008
2:14 am

Eric, This did the trick. Thanks so much for the quick reply. Much appreciated. ... http://developer.yahoo.com/yui/examples/autocomplete/ac_skinning.html...
sfcalvert
Offline Send Email
May 15, 2008
5:27 pm

How can I iterate fathers of a current node in treeview ?...
malutanpetronel
Offline Send Email
May 19, 2008
6:18 am

malutanpetronel, The TreeView API gives you the node's parent, its TreeView, and the TreeView's root. So you can do something like this: ...
Eric Miraglia
ericmiraglia
Offline Send Email
May 19, 2008
7:23 pm

after a dynamic first level draw I try : tree.draw(); alert(currentSon); LoadDrawing(currentSon.data.id); DisplayTables(currentSon); oSelectedNode = null; ...
malutanpetronel
Offline Send Email
Jun 9, 2008
5:09 pm

done......
malutanpetronel
Offline Send Email
Jun 9, 2008
5:19 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help