Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7162817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:47:52+00:00 2026-05-28T13:47:52+00:00

I am using YUI layout and autocomplete in the same page. The problem is

  • 0

I am using YUI layout and autocomplete in the same page. The problem is that autocomplete field dropdown goes behind the layout.
I think the problem is with z-order but couldn’t find it after a bit of research.

Here is the simplified piece of code I have, just copy it to html file and it should work (enter letter a for example to see the problem):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />


<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/resize/assets/skins/sam/resize.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/autocomplete/assets/skins/sam/autocomplete.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/layout.css">

<link rel="stylesheet" type="text/css" href="main.css"></link>

<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>

<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/animation/animation-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/layout/layout-min.js"></script>



<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/datasource/datasource-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/autocomplete/autocomplete-min.js"></script>

</head>

<body class="yui-skin-sam">

<div id="header" >

<div class="header2">
    <span class="right-float topPad4px" id="myAutoComplete">
        <input class="searchInput" id="searchInput" type="text" size="25" value=""/>
        <div id="results"></div> 
        <input id="myHidden" type="hidden"> 
    </span>
</div>

</div>

<div class="mainArea">
    <div id="tree" class="tree" style="margin-left :20px">
    </div>
    <div id="center" class="centerDiv">
    </div>
</div>

<script>

(function() {
    var Dom = YAHOO.util.Dom,
        Event = YAHOO.util.Event;

    Event.onDOMReady(function() {
        var layout = new YAHOO.widget.Layout({
            units: [
                { position: 'top', height: 40, body: 'header', gutter: '0px'},
                { position: 'left', width: 280, resize: true, body: 'tree', scroll: true, animate: false },
                { position: 'center', body: 'center', scroll: true }
            ]
        });

        layout.render();

        Event.on('tLeft', 'click', function(ev) {
            Event.stopEvent(ev);
            layout.getUnitByPosition('left').toggle();
        });   
    });
})();

var ds = new YAHOO.util.LocalDataSource(["apples", "apricots", "bananas"]);


var ac = new YAHOO.widget.AutoComplete("searchInput", "results", ds);

</script>

</body>
</html>

my question is – what do I need to modify for the autocomplete dropdown to appear on top of layout?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:47:53+00:00Added an answer on May 28, 2026 at 1:47 pm

    Ok, found the answer on yui forum, basically I need to add bold items:

    { position: ‘top’, height: 28, body: ‘top1’, scroll: null, zIndex: 2 },

    see http://developer.yahoo.com/yui/examples/layout/menu_layout.html for more details in the “Fixing the hidden Menus” section.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using YUI 3 CSS Reset on my page, but want to display a
I am using the YUI layout manager which seems to work at an OK
I am currently using YUI datatable, but it is buggy: http://developer.yahoo.com/yui/datatable/ Is there another
I am using YUI's datatable ( http://developer.yahoo.com/yui/datatable/ ) to make a table. But notice
Problem in YUI:I am using YUI grid,my dataset contains some special character.i bind my
Using YUI, I have a div, with an attached listener that says if I
I am using YUI 2 autocomplete , I have my own web service which
I am using YUI reset and jquery AutoGrow together on the same site. It
We are using YUI's onclick events, but we create and delete dome nodes rapidly
I'm trying to link to the YUI reset stylesheet in my RoR layout using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.