Bryan
Bryan

Reputation: 15

Why is my bootstrap margin not returning a result?

I have a big problem for several days. The bootstrap margin dont work.

I have try "mr-md-4", "mr-4". It's the same problem.

Is there something that I did not understand? If so, I would love to learn it :)

Below is a demonstration JSFiddle.

https://jsfiddle.net/gyfuLome/

My code :

<div class="row">
    <span style="background-color : blue;" class="mr-md-5 col-md-1">test</span>
    <span style="background-color : red;" class="col-md-1">test</span>
</div>

Thank you very much, Regards,

Upvotes: 0

Views: 66

Answers (1)

Milan Tenk
Milan Tenk

Reputation: 2695

In the JSFiddle example bootstrap.css is missing, this is why the bootstrap classes like mr-md-5 are ignored. Add the following URL to Resources:

https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css

It should look like this:

enter image description here

After adding the css url of bootstrap the classes of it work as expected: enter image description here

Upvotes: 1

Related Questions