Safari 6.0问题将CSS定位推向左侧

时间:2013-02-13 23:50:35

标签: css

好吧,这是我遇到的一个问题,但我会尽力让它听起来不那么本地化,因为这实际上可能与Safari有关...

在我的http://s361608839.websitehome.co.uk/101d/html_new/index.html网站上,我们有一个样式为ozo_button的按钮,其内部跨度为btn_arrow_right,除了Safari之外,所有浏览器中都有正确的形式:

enter image description here

是什么原因导致CSS在Safari 6.0中使按钮看起来像这样(下图),箭头位于文本后面?

enter image description here

HTML:

<a class="ozo_button" href="https://console.101distribution.com?v=register" style="width:200px;cursor:pointer;"><span class="btn_arrow_right ozo_button_icon">icon</span><span class="ozo_button_label">Sign-Up &amp; Get Started</span></a>

CSS:

a.ozo_button {
font-family: Verdana;
font-weight: bold;
font-size:13px;
width:75px;
text-decoration:none;
display:block;
padding:5px 15px 5px 0px;
border:1px solid #999999;
text-align:center;
-moz-border-radius:5px;
-webkit-border-radius:5px;
-o-border-radius:5px;
border-radius:5px;
color:#333;
border:1px solid #DDD;
background:#FFFFFF;
background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFFFFF), to(#EEE));
background:-moz-linear-gradient(0% 90% 90deg, #EEE, #FFF);  
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}

a.ozo_button span.ozo_button_icon {
vertical-align:middle;
margin-left: 0px;
float: left;
}
a.ozo_button span.ozo_button_label{
vertical-align:middle;
padding-left:25px;
}
.btn_arrow_right{
text-indent:-9999px;
position:absolute;
height: 35px;
width: 35px;
background:url(../images/arena_sprite.png) -263px -80px no-repeat transparent;
float: left;
}

1 个答案:

答案 0 :(得分:0)

如果您使用display:inline-block;

,请根据要求尝试display:block;float:left;也使用display:block;