如何减少按钮之间的空间?

时间:2014-12-06 15:26:40

标签: css html5 button

我是css和html5的新手,并尝试让顶部按钮正常工作。按钮左侧水平对齐。我似乎可以在它们之间添加适当的空间。如何修复我的代码而不会弄乱我的页面布局?非常感谢您的帮助,这里是代码:



    .dashboard, #logOuta {
        width:160px;
        padding:10px 25px 12px 26px;
        font-size:18px;
        text-decoration:none;
        font-family:Arial;
        color:#fff;
        text-align:center;
        box-shadow:1px 1px 1px #666;
        background:#23A3DA;
        background-image:-webkit-linear-gradient(top,#23A3DA,#03171F);
        background-image:-moz-linear-gradient(top,#23A3DA,#03171F);
        background-image:-ms-linear-gradient(top,#23A3DA,#03171F);
        background-image:-o-linear-gradient(top,#23A3DA,#03171F);
        background-image:linear-gradient(to bottom,#23A3DA,#03171F);
        border-bottom:2px solid #ffd175;
        -webkit-border-radius:5;
        -moz-border-radius:5;
        border-radius:5px;
        -webkit-box-shadow:1px 1px 1px #666;
        -moz-box-shadow:1px 1px 1px #666;
        cursor:pointer
    }
    
    .dashboard:hover {
        background:#E3A019;
        background-image:-webkit-linear-gradient(top,#E3A019,#E3A019);
        background-image:-moz-linear-gradient(top,#E3A019,#E3A019);
        background-image:-ms-linear-gradient(top,#E3A019,#E3A019);
        background-image:-o-linear-gradient(top,#E3A019,#E3A019);
        background-image:linear-gradient(to bottom,#E3A019,#E3A019);
        text-decoration:none
    }

     <div class="logoutbox">
              <button class="dashboard">Dashboard</button>
              <input name="logOuta" type="button" id="logOuta" value="Sign Out"/>
      </div>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

 button {
   margin-right: 50px; /* whaever spacing you want */
 }