Make it create a scroll bar when two components collide

0

For example, I have two divs on the page, and they are defined by width and height, but when they collide I'd like to see a scroll bar instead.     

asked by anonymous 12.04.2017 / 05:14

1 answer

1

I made an example using box-flex , I do not know what suits you, but it follows below:

.pagina {
  overflow: auto;
  display: -webkit-box;
  display: -moz-box;
}
.esquerda {
  background-color: red;
  width: 100%;
}
.direita {
  background-color: blue;
  width: 100%;
}
<div class="pagina">
  <div class="esquerda">
    a
  </div>
  <div class="direita">
    b
  </div>
</div>
    
12.04.2017 / 13:53