[ 7 posts ]

Twoflower

  • Joined: Wed Feb 02, 2011 9:35 am
  • Posts: 40
  • Offline
  • Profile

How to see YUI3 auto-complete on top of all?

Post Posted: Wed Mar 09, 2011 3:09 am
+0-
Hi,

How would I skin ac list to be on top of all element? Some of my elements (<ul> and <li>) are on top of ac list.

I tried the styling in my html the classes skinning:

.yui3-aclist-item, .yui3-aclist, .yui3-aclist-content{z-index:30;}

In Firebug I can see the classes are added and z value is 30.

also tried just

.yui3-aclist-content{position:inherit;z-index:30;}

playing around with different position options other that 'inherit' but no joy.

Please assist or give some pointers on skinning ac.

Twoflower

  • Joined: Wed Feb 02, 2011 9:35 am
  • Posts: 40
  • Offline
  • Profile

Re: How to see YUI3 auto-complete on top of all?

Post Posted: Thu Mar 10, 2011 9:47 am
+0-
Does any one have a quick tip for me?

Ryan Grove

YUI Developer

  • Username: rgrove
  • Joined: Tue Dec 09, 2008 9:55 pm
  • Posts: 275
  • Location: Portland, OR
  • Twitter: yaypie
  • GitHub: rgrove
  • Gists: rgrove
  • IRC: rgrove
  • YUI Developer
  • Offline
  • Profile

Re: How to see YUI3 auto-complete on top of all?

Post Posted: Thu Mar 10, 2011 10:19 am
+0-
Sorry, missed this one.

The AutoComplete container inherits the stacking context of its parent element. If there are other elements on the page with a higher stacking context than AutoComplete's parent, that could result in those elements appearing above the AutoComplete list.

This will be easier to debug if you can share the HTML and CSS in question (or a link to a live site), but in general you should try giving AutoComplete's parent element "position: relative" and a z-index higher than that of any sibling elements.

Twoflower

  • Joined: Wed Feb 02, 2011 9:35 am
  • Posts: 40
  • Offline
  • Profile
Tags:

Re: How to see YUI3 auto-complete on top of all?

Post Posted: Wed Mar 16, 2011 9:08 am
+0-
No worries.

Here are my files:

html
css
js

I again tried your suggestion but no joy.

Thanks,

Ryan Grove

YUI Developer

  • Username: rgrove
  • Joined: Tue Dec 09, 2008 9:55 pm
  • Posts: 275
  • Location: Portland, OR
  • Twitter: yaypie
  • GitHub: rgrove
  • Gists: rgrove
  • IRC: rgrove
  • YUI Developer
  • Offline
  • Profile

Re: How to see YUI3 auto-complete on top of all?

Post Posted: Wed Mar 16, 2011 11:22 am
+0-
Looks like the only way to fix this in 3.3.0 is to manually specify a z-index for the AutoComplete list in JS.

Try changing your AutoComplete config to this:

Code:
var ac = new Y.AutoComplete({
    inputNode: '#ac-input',
    minQueryLength: 3,
    queryDelimiter: " ",
    resultFilters: 'phraseMatch',
    resultHighlighter: 'phraseMatch',
    source: rdfInst,
    zIndex: 1
});

I've fixed this bug in git, and the fix will be in 3.4.0.

Twoflower

  • Joined: Wed Feb 02, 2011 9:35 am
  • Posts: 40
  • Offline
  • Profile

Re: How to see YUI3 auto-complete on top of all?

Post Posted: Fri Mar 18, 2011 6:05 am
+0-
Thanks, that works like a charm!

Twoflower

  • Joined: Wed Feb 02, 2011 9:35 am
  • Posts: 40
  • Offline
  • Profile
Tags:

Re: How to see YUI3 auto-complete on top of all?

Post Posted: Fri Mar 18, 2011 6:06 am
+0-
Thanks, that works like a charm!
  [ 7 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum