开发者

YUI autocomplete in datatable is hidden in the cell/CSS-Problem

I have a YUI datatable and would like to have an autoComplete in one of the columns. I get the autocomplete to work and everything, but now I have a CSS problem, it seems.

The autoComplete is hidden in the cell of the column and I can't choose from anything, because I just can't see it. How can I make it lay on top of the view? I tried turning on the z-index, put it to 11000 because I somewhere read that yui uses 10000, but it still won't work.

Any suggestions what I should do next?

My columnFormatter

var suggestFormatter = function(elCell, oRecord, oColumn, oData){
    var id = oRecord.getData('questionId');
    var html = '<div id="suggest" style="position:static;z-index:11111;">';
    html+= '<input id="category_s开发者_开发知识库uggest'+id+'" onfocus="initSuggest(\''+id+'\')" type="text" style="position:static;">';
    html+= '<div id="category_suggest_container'+id+'" style="width:150px;position:static;"></div>';
    html+= '</div>';
    html+= '<input type="hidden" id="categoryId'+id+'" name="categoryId"/>';
    elCell.innerHTML = html;    
};


Are you sure it is position:static you want? Try using relative or absolute. Read more on positioning here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜