如何在HTML中的两个内联按钮(BTN)之间添加边距

时间:2016-02-15 15:04:32

标签: html css

我是一名学习HTML和CSS的新编码员。

我已经将两个BTN编码到我的HTML项目中,但是它们内联在一起,看起来很愚蠢。

如何在它们之间添加边距,请使美观看起来合适。

http://www.plus2net.com/php_tutorial/display-record-edit.php

  

我的HTML

{{1}}

2 个答案:

答案 0 :(得分:2)

为什么你认为保证金不起作用?



a.btn {
  margin: 0 1em;
}

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="jumbotron">
  <h1>Boutique Recruitment Solutions</h1>
  <p class="lead">We are an indapendant recruitment company specialising in providing bespoke HR services.
    <br>We take the time to understand our clients vision, goals and culture allowing us to engage with the right talent to fill the vacany.</p>
  <p><a class="btn btn-primary btn-lg" role="button">Submit Your CV</a><a class="btn btn-primary btn-lg" role="button">Fill A Vacancy</a>
  </p>
</div>
&#13;
&#13;
&#13;

答案 1 :(得分:1)

只需使用保证金属性。

<div class="jumbotron">
        <h1>Boutique Recruitment Solutions</h1>
        <p class="lead">We are an indapendant recruitment company specialising in providing bespoke HR services.<br> We take the time to understand our clients vision, goals and culture allowing us to engage with the right talent to fill the vacany.</p>
        <p><a class="btn btn-primary btn-lg" role="button" style="margin-right: 100px">Submit Your CV</a><a class="btn btn-primary btn-lg" role="button">Fill A Vacancy</a></p>
      </div>