右上方的按钮位置

时间:2015-02-04 18:25:37

标签: jquery html css

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

我还添加了以下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 个答案:

答案 0 :(得分:1)

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

#refresh, #build {
    float:right;
}

答案 1 :(得分:1)

只需添加:

#refresh, #build{float:right}

到你的css,它使#build,#refresh类向右浮动。