Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split screen containers with scrolling

Tags:

html

css

I'm looking to create a web page in html/css that will split the width of the screen in 2, will keep the height at 100% with enabled scrolling, will always keep it that way, and which will have overflow content that will scroll horizontally and vertically. The image below shows a basic diagram of what I want to do:enter image description here

like image 289
Hey'Youssef Avatar asked Oct 18 '25 20:10

Hey'Youssef


1 Answers

You can use flex to wrap div to set them side by side and style box as below:

.wrap{display:flex;}
.box{
height: 100vh;
    width: 50vw;
    background-color: blue;
    overflow: scroll;
}
<div class="wrap">
  <div class="box">

  </div>
  <div class="box">

  </div>
</div>

You can use inline-block

.box{
  display:inline-block;
  height: 100vh;
   width: 49%;
    background-color: blue;
    overflow: scroll;
}
<div class="box">
</div>
<div class="box">
</div>
like image 119
לבני מלכה Avatar answered Oct 21 '25 10:10

לבני מלכה



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!