Hey. Chciałbym umieścić border wewnątrz diva, dodatkowo ustawić marginy dotyczące tylko border.
Tak jest:
Tak chciałbym żeby było:
kod poniżej:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/custom.css">
</head>
<body>
<div class=""> <!-- TEN PIERWSZY DIV -->
<div class="container-fluid">
<div class="row">
<div class="col-xs-6 col-xl-6 sto red borderleft" >
1
</div>
<div class="col-xs-6 col-xl-6 sto blue borderright">
2
</div>
</div>
</div>
</div>
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>
CUSTOM CSS (reszta plików to oryginalne bootstrap.css oraz bootstrap.js wersja 4)
.sto {
height: 100vh;
min-height: 100vh;
}
.red{
background-color: #e74c3c;
}
.blue{
background-color: #3498db;
}
.borderleft{
border-width: 10px 0px 10px 10px;
border-style: solid;
border-color: black;
box-sizing: border-box;
}
.borderright{
border-width: 10px 10px 10px 0px;
border-style: solid;
border-color: black;
box-sizing: border-box;
}
.pad{
padding: 20px;
}