In this article I saw Bootstrap 4 Spacing Utility Classes, and he uses m-b-lg
in className
.
JavaScript
x
6
1
<div class="row">
2
<div class="col-sm-6 m-b-lg">
3
<!-- column-small-50%, margin-bottom-large -->
4
</div>
5
</div>
6
But when I use it on meteorjs with react nothing happens. Am I missing something or missing a plugin?
JavaScript
1
19
19
1
<div className="container-fluid">
2
<div className="col-xs-6 col-xs-offset-3 m-t-lg">
3
<h1 className="text-xs-center"> Login </h1>
4
<form>
5
<div className="form-group">
6
<input type="email" className="form-control" id="inputEmail" placeholder="Email"/>
7
</div>
8
<div className="form-group">
9
<input type="password" className="form-control" id="inputPassword" placeholder="Password"/>
10
<p className="text-xs-center"><a href="/signup"> Forgot your email or password?</a></p>
11
</div>
12
<div className="form-group">
13
<button className="btn btn-primary btn-block" type="submit"> Login </button>
14
<p className="text-xs-center"> New to Arcademy? <a href="/signup"> Sign up now.</a></p>
15
</div>
16
</form>
17
</div>
18
</div>
19
Advertisement
Answer
Refer to the Spacing (Bootstrap v4 alpha) documentation.
The classes are named using the format: {property}-{sides}-{size}
Where size is one of: *
0
– for classes that eliminate themargin
orpadding
by setting it to0 * 1
– (by default) for classes that set the margin or padding to$spacer-x
or$spacer-y * 2
– (by default) for classes that set the margin or padding to$spacer-x * 1.5
or$spacer-y * 1.5 * 3
– (by default) for classes that set the margin or padding to$spacer-x * 3
or$spacer-y * 3
.
So use m-t-3
instead of m-t-lg
.