Two column grid how to prevent overlapping

bitshift

I've started a new layout like shown below, but if I start resizing the browser, the content in the "right" column, will overflow into the left column, at least until the "break" is hit and bootstrap starts stacking the items.

How can I control this overflow problem?

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>

<div class="container-fluid" style="margin-bottom:5px">
  <div class="col-sm-12">
    <div class="row">
      <div class="col-sm-6">a</div>
      <div class="col-sm-6">b</div>
    </div>
  </div>
</div>

[ update ]
I think my issue was related to the min-width attribute Im running into with the different col-* classes. Once I defined some values for these, I can control where the "breaking" occurs.

blurfus

Do you need to keep this layout?

I feel you have a useless column with a a row (which itself contains two columns inside)

You could simplify your layout and simply have a container with row(s) - and then each row will have the necessary columns.

Sort of like this:

(added the green border CSS for illustration purposes only - remove as necessary)

div.col-sm-6{
  border: 1px solid green;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>

<div class="container-fluid" style="margin-bottom:5px">
  <div class="row">
    <div class="col-sm-6">a</div>
    <div class="col-sm-6">b</div>
  </div>
</div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to prevent overlapping schedules in Spring?

How to prevent overlapping in view?

How to prevent span tags overlapping each other?

How to prevent textblock to overlapping?

How to prevent grid-row span from changing column placement?

Responsive two column grid

How to prevent css grid column from exceeding max-height of the grid container?

How to prevent overlapping of buttons and other objects?

How to merge two overlapping dataframes

How do I prevent imageview overlapping?

How do I place an image overlapping two rows in a grid

how to prevent overlapping of 2 components

Prevent overlapping values on CIDR column in PostgreSQL

How to stop overlapping two div?

How to prevent the overlapping of two input labels in splitLayout, Shiny, R?

Plotly: How to prevent text overlapping between traces?

How to prevent child Views overlapping their parent ScrollView?

Plotly: How to prevent title from overlapping the plot?

How to prevent divs from overlapping

Merging two dataframes with overlapping and non-overlapping column names

How to prevent scatter legend from overlapping?

How to prevent overlapping the contents of two column

Prevent overlapping of two span elements

How to merge two dataframe with column in overlapping datetime range

How to Prevent Overlapping of Subplots in Python?

How to prevent NSToolbar overlapping NSViewController content?

How to prevent Input element from exceeding width of CSS grid column

Prevent two fixed components from overlapping

How to display single column value in two column ag grid