急!!!!编写的连接按钮,为什么不是并排的,而是竖排的呢
<style type ="text/css" >
a
{
display :block ;
font-family:Arial;
font-size:.8em;
text-align :center ;
margin :2px;
}
a:link,a:visited
{
color:#A62020;
padding: 2px 4px 2px 4px;
background-color:#ddd;
text-decoration :none;
border-top :1px solid #eeeeee;
border-left :1px solid #eeeeee;
border-bottom :1px solid #717171;
border-right :1px solid #717171;
}
a:hover
{
color :#821818;
padding :5px 8px 3px 12px;
background-color :#ccc;
border-top :1px solid #717171;
border-left :1px solid#717171;
border-bottom :1px solid #eeeeee;
border-right :1px solid #eeeeee;
}
</style>
效果图:
------解决方案--------------------a{
display:inline-block
}
参考 display float2个属性的描述
他们对于排列的显示方式很重要