You might have an HTML page layout with divs elements, for example, a layout with a Left Div section that holds the Body/Contents of the page and the Right Div that displays Facebook Like-box, Tags and other stuff (as this website has). You might see that the left div section may vary in size depending upon the length the contents it holds, so you might get a vertical scroll added to the right div, let's see what CSS properties to use to avoid the scrollbar.
You must create a container div that holds both the left and the right divs, and add the following CSS properties to it : height: auto !important and overflow: hidden. For the Left and the Right divs, you can set minimum height and set overflow as auto, example : min-height: 1200px and overflow: auto
File : sample.html<div class="container">
<div class="leftSection">
<p>contents of Left side</p>
</div>
<div class="rightSection">
<p>contents of Right side</p>
</div>
</div>
layout.css
.container-box {
width: 700px;
min-height: 900px;
height: auto !important;
overflow: hidden;
margin-left: auto;
margin-right: auto;
}
.rightSection {
width: 500px;
background:#ddd;
min-height: 1600px;
float: right;
overflow: auto;
margin-top: 0px;
display: inline-block;
text-align: center;
}
.leftSection {
width: 200px;
min-height: 1600px;
float: left;
background:#eee;
overflow: auto;
display: inline-block;
text-align: center;
}
- remove div vertical scroll
- Create HTML button that looks like a href hyperlink
- Comprehensive 256 Ascii code table with Html Hex IBM Microsoft Key
- HTML5 HELLO WORLD Example
- Get HTML table td, tr or th inner content value with id or name attribute
- Adding Sub Headings to Bootstrap Header tags
- What is the doctype for HTML5?
- Chessboard with pieces using pure HTML and CSS
- Hyperlink in html (anchor tag) without a underline
- W3 : character data is not allowed here html validation error
- Fibonacci series from 1 to 500 table
- 9 Border to DIV Element in HTML Examples
- How to add multiple spaces between html page text
- How to turn off autocomplete in input fields in HTML Form
- Default speed of Marquee tag : SCROLLAMOUNT
- How to word wrap in HTML
- Force convert HTML text input to upper case
- HTML5 CSS3 Color Codes List
- How to remove old 404 pages ulrs from Google crawler
- reCaptcha Verification expired. Check the checkbox again
- All directional arrows codes for HTML
- Align html element at the center of page vertically and horizontally
- How to make a div tag clickable
- Remove Html head and body tags from ckeditor source
- Auto Refresh Webpage after every x Second or Minute using Meta Tag?
- [fix] RabbitMQ: AuthenticationFailureException ACCESS_REFUSED Login refused authentication mechanism PLAIN - 2022
- Install the minimal Linux on Docker (only 5 mb Alpine Linux) - Docker
- Add Sketch from iPhone to MacBook with macOS Monterey - MacOS
- Word count in Notepad++ - NotepadPlusPlus
- How to hide toolbar on Notepad++ - NotepadPlusPlus
- ModuleNotFoundError: No module named qdarkstyle.colorsystem [Python] - Python
- Fix: Notepad++ bottom status bar not visible - NotepadPlusPlus
- [Solved] Mic not working on iPhone 7 after iOS 14 upgrade - Apple