I've set up a basic bs4 layout where the left-menu is represented by
<div class="col-md-2">
, the center-main-content by <div class="col-md-6">
, and the right-menu by <div class="col-md-4">
. Using Chrome dev-tool, you can see that there is adequate space between the left-menu and the center-main-content, but not between the center-main-content and the right-menu.
https://i.sstatic.net/0qcOT.png
Upon further inspection, I noticed that text was intruding into the padding. Take a look at the text overlapping with the padding (green) below;
https://i.sstatic.net/6TCKd.png
...and upon closer examination, I even found this text encroaching on the padding too;
How can I prevent this from happening? I want to have proper padding or margin between the columns. Here's a quick peek at my markup
This is the minimal code snippet for the setup;
<html lang="en">
<head>
<title>New Post!Admin Area</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<main role="main">
<div class="container-fluid">
<div class="row">
<!-- left menu -->
<div class="col-md-2">
<div id="accordion" class="accordion">
<!-- content // collapseOne-->
<div class="card cardmargin">
<div class="card-header">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
<span class="fas fa-cloud"></span>Content</a>
</div>
<div id="collapseOne" class="collapse" data-parent="#accordion">
<div class="panel-body">
<table class="table">
<tr>
<td>
<span class="fas fa-pencil-alt"></span><a href="http://www.jquery2dotnet.com">Articles</a>
</td>
</tr>
<tr>
<td>
<span class="fas fa-newspaper"></span><a href="http://www.jquery2dotnet.com">News</a>
</td>
</tr>
<tr>
<td>
<span class="fas fa-paper-plane"></span><a href="http://www.jquery2dotnet.com">Newsletters</a>
</td>
</tr>
<tr>
<td>
<span class="fas fa-comments"></span><a href="http://www.jquery2dotnet.com">Comments</a>
<span class="badge badge-dark">42</span>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- center-main-content -->
<div class="col-md-6">
<div class="row">
<h2>Some Title</h2>
</div>
<div class="row">
Some Category
</div>
<div class="row">
<p>It is a long established fact that a reader will be
distracted by the readable content of a page when looking
at its layout. The point of using Lorem Ipsum is that it
has a more-or-less normal distribution of letters, as
opposed to using 'Content here, content here',
making it look like readable English. Many desktop
publishing packages and web page editors now use Lorem
Ipsum as their default model text, and a search for '
lorem ipsum' will uncover many web sites still in their
infancy. Various versions have evolved over the years,
sometimes by accident, sometimes on purpose (injected
humour and the like).</p>
<p>It is a long established fact that a reader will be
distracted by the readable content of a page when looking
at its layout. The point of using Lorem Ipsum is that it
has a more-or-less normal distribution of letters, as
opposed to using 'Content here, content here',
making it look like readable English. Many desktop
publishing packages and web page editors now use Lorem
Ipsum as their default model text, and a search for '
lorem ipsum' will uncover many web sites still in their
infancy. Various versions have evolved over the years,
sometimes by accident, sometimes on purpose (injected
humour and the like).</p>
</div>
</div>
<!-- right-menu -->
<div class="col-md-4">
</br>
<!-- created -->
<div class="row">
<h5>Created:</h5>
</div>
<div class="row">
2021-06-12 06:26:23
</div>
</br>
<!-- updated -->
<div class="row">
<h5>Updated:</h5>
</div>
<div class="row">
2021-06-12 06:26:23
</div>
</br>
<!-- Author -->
<div class="row">
<h5>Author:</h5>
</div>
<div class="row">
mainuser
</div>
</br>
<!-- publised -->
<div class="row">
<h5>Published?</h5>
</div>
<div class="row">
No
</div>
</br>
<!-- featured image -->
<div class="row">
<h5>Featured Image</h5>
</div>
<div class="row">
<img src="https://development.example.com/filemanager_files/thumbs/no-image.jpg" >
</div>
</div>
</div>
</div> <!-- /container -->
<hr>
</main>
<footer class="container">
<p>© example.com 1999-2021 || Phone: +81-555-5555-5555 || Fax: +81-555-5555-5555|| Email: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9bf2f5fdf4dbfee3faf6ebf7feb5f8f4f6">[email protected]</a> </p>
</footer>