fuchsteufelswild fuchsteufelswild - 3 months ago 26
CSS Question

Bootstrap SImple Sidebar - Content below overlaps

I'm using the Sidebar Template (https://startbootstrap.com/template-overviews/simple-sidebar/) and i want some content below the sidebar and the content to the right of the sidebar. It works fine, but when i resize the window the content below overlaps and goes all the way to the top.

I got something like this:

<div id="wrapper">

<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
Start Bootstrap
</a>
</li>
</ul>
</div>
<!-- /#sidebar-wrapper -->

<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1>Simple Sidebar</h1>
<p>This template has a responsive menu toggling system. The menu will appear collapsed on smaller screens, and will appear non-collapsed on larger screens. When toggled using the button below, the menu will appear/disappear. On small screens, the page content will be pushed off canvas.</p>
<p>Make sure to keep all page content within the <code>#page-content-wrapper</code>.</p>
<a href="#menu-toggle" class="btn btn-default" id="menu-toggle">Toggle Menu</a>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->

</div>

<!-- /#wrapper -->
<div id="content-below">

</div>


Where should i place the "content-below" container to prevent it from going all the way to the top after resizing?

Answer

just comment out the following section in css:

#page-content-wrapper {
    width: 100%;
    /* position: absolute; */
    padding: 15px;
}

see example here codepen

enjoy.. :)