代码之家  ›  专栏  ›  技术社区  ›  casillas

右上方的按钮位置

  •  0
  • casillas  · 技术社区  · 11 年前

    我想移动右上方的刷新和构建按钮。当前它保持在右上方。

    我还添加了以下css,但看起来很奇怪。

    #refresh,#build
    {
        line-height: 12px;
         width: 18px;
         font-size: 8pt;
         font-family: tahoma;
         margin-top: 1px;
         margin-right: 2px;
         position:absolute;
         top:0;
         right:0;
    }
    
    <div class="accordion-expand-holder">
    <button type="button" id="refresh">Refresh</button>
    <button type="button" id="build">Build</button>
    <button type="button" class="open">Expand all</button>
    <button type="button" class="close">Collapse all</button>
    <div id="accordion">
    </div>
    </div>
    

    enter image description here

    2 回复  |  直到 11 年前
        1
  •  1
  •   pojomx    11 年前

    只需添加:

    #refresh, #build{float:right}
    

    对于css,它使build、refresh类向右浮动。

        2
  •  1
  •   indubitablee    11 年前

    像这样的? http://jsfiddle.net/xg7cr0g4/47/

    #refresh, #build {
        float:right;
    }