2015-12-02 70 views
1

我想将我的按钮放在我的文本右侧。不幸的是,它不断下降到一个新的水平。我该如何解决这个问题?显示按钮旁边的文本按钮

小提琴:http://jsfiddle.net/vkp4q8cv/

代码:

* { 
 
    text-align:center 
 
} 
 

 
.eupopup-button_1 { 
 
    font-size: 16px; 
 
    background: #ffffff; 
 
    border-radius: 10px; 
 
    -moz-border-radius: 10px; 
 
    -webkit-border-radius: 10px; 
 
    border: 1px solid #1588cb; 
 
    color: #1588cb; 
 
    font-weight: 400; 
 
    position: relative; 
 
    margin: 25px auto 50px auto; 
 
    -webkit-box-sizing: content-box; 
 
    -moz-box-sizing: content-box; 
 
    -o-box-sizing: content-box; 
 
    box-sizing: content-box; 
 
    transition: color 0.1s linear; 
 
    height: 60px; 
 
    width:120px; 
 
    display:inline-block; 
 
    line-height: 60px; 
 
    -webkit-appearance: none; 
 
    z-index: 190; 
 
    text-align: center; 
 
} 
 

 
.eupopup-closebutton { 
 
    position: absolute; 
 
    font-family: helvetica, arial, verdana, sans-serif; 
 
    top: 0; 
 
    right: 0; 
 
}
<div class="eupopup-container eupopup-container-fixedtop eupopup-color-default"> 
 
    <div class="eupopup-head"> 
 
    This site uses cookies to store information on your computer 
 
    </div> 
 
    <div class="eupopup-body"> 
 
    </div> 
 
    <div class="eupopup-buttons" style="position: relative;"> 
 
    <a href="#" class="eupopup-button eupopup-button_1">Learn more</a> 
 
    <a href="/cookie-policy/" target="_blank" class="eupopup-button eupopup-button_2"></a> 
 
    <div class="clearfix"></div> 
 
    </div> 
 
    <a href="#" class="eupopup-closebutton">x</a> 
 
</div>

+1

你想要的按钮只是在文本(又名内联)或固定在右侧,靠近关闭按钮? – Kerstomaat

+0

道歉。内联,在文本之后将是辉煌的:-) – michaelmcgurk

+1

我认为你正在使这个结构太复杂,这样一个简单的任务,但看看这个http://jsfiddle.net/vkp4q8cv/1/ – Lidaranis

回答

1

只是让一切都内嵌块

.eupopup-buttons, .eupopup-head, .eupopup-body { 
    display: inline-block; 
} 

我不知道,如果你使用曾经计划..-身体,b因为这需要更多的变化

+0

非常感谢,西蒙 - 完美工作:-) – michaelmcgurk