I am trying to get bootstrap 4.1 to offset my columns. I have copied the sample from here. My page has:
@page
@{
Layout = "./Shared/_NoLayout";
}
@model OVNew.Pages.TestModel
<h2>Test</h2>
<div class="container ">
<div class="row">
<div class="col-md-4 test-div">.col-md-4</div>
<div class="col-md-4 offset-md-4 test-div">.col-md-4 .offset-md-4</div>
</div>
<div class="row">
<div class="col-md-3 offset-md-3 test-div">.col-md-3 .offset-md-3</div>
<div class="col-md-3 offset-md-3 test-div">.col-md-3 .offset-md-3</div>
</div>
<div class="row">
<div class="col-md-6 offset-md-3 test-div">.col-md-6 .offset-md-3</div>
</div>
</div>
The layout file is minimal:
<!DOCTYPE html>
<html>
<head >
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="~/css/site.css" />
<script src="~/lib/jquery/dist/jquery.min.js"></script>
</head>
<body>
<!--<partial name="_CookieConsentPartial" />-->
@RenderBody()
</body>
</html>
and test-div is defined so:
.test-div {
background-color: antiquewhite;
border: 1px solid;
margin: 5px;
}
My page comes out as shown in the attachment - NO OFFSETS... If I remove the enclosing container div the situation is similar.
What is going on?
I am using bootstrap 4.1.3. I saw there were issues with this in beta but it is supposed to be fixed, per the 4.1 docs.