2016-02-15 1 views
2

Я новый кодер, изучающий HTML и CSS.Как добавить промежуток между двумя встроенными кнопками (BTN) в HTML

Я закодировал два BTN в свой проект HTML, но они помещены вместе inline, который выглядит глупым.

Как добавить промежуток между ними, пожалуйста, чтобы эстетика выглядела правильно.

enter image description here

Мой HTML

<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> 
+0

в css. укажите –

+0

Кнопки выглядят так, как будто они имеют свойство 'inline-block', поэтому поля должны работать на них? Можем ли мы увидеть CSS для элементов? – Aaron

ответ

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>

+0

Я очень ценю это. Спасибо за рулевое управление. будет повышаться. –

0

Просто используйте атрибут маржу.

<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> 
Смежные вопросы