【问题标题】:how to show a auto suggest div box over other elements如何在其他元素上显示自动建议 div 框
【发布时间】:2013-06-10 15:23:36
【问题描述】:

我是 css 新手。我可以轻松地从后端获取建议到建议 div。

建议 div 的高度设置为 height:auto,因为它会根据显示的建议自动调整

<div class="suggestBox">
     <div class="suggestionsBox" style="margin-left:16px">
     <div class="suggestions bordered" style="height: auto; max-height: none; width:100%; overflow: hidden; padding: 0px; ">
      <div class="jspContainer" style="width: 100%; height: 0px; ">
      <div class="jspPane" style="padding: 0px; top: 0px; width: 100%; ">
    <div class="items_block"></div>
    <div class="users_block"></div>
    </div>
     </div>
     </div>
    </div>

但随着它的高度发生变化,即增长......建议框或 div 下的元素分散或类似的东西......我是否必须在 CSS 中更改一些东西......

//THANX 

【问题讨论】:

  • 你考虑过使用 jQuery UI 吗? jqueryui.com/autocomplete
  • 要在某些元素上添加内容,我想你可以使用 CSS z-index。

标签: php mysql css ajax


【解决方案1】:

为了在 CSS 中保持层的深度,z-index 属性。

【讨论】:

    【解决方案2】:

    尝试给它position:absolute; 以将其从文档布局中删除。 看这个教程:http://www.barelyfitz.com/screencast/html-training/css/positioning/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-18
      • 2015-09-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多