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 Html head and body tags from ckeditor source
- Default speed of Marquee tag : SCROLLAMOUNT
- Align html element at the center of page vertically and horizontally
- HTML, HTML5. CSS, CSS3 Color Codes 2020
- How to add multiple spaces between html page text
- Force convert HTML text input to upper case
- Obsolete marquee element alternatives html5
- How to set background color in HTML page?
- Base 64 Index, Character and Binary Table
- Hyperlink in html (anchor tag) without a underline
- How to remove old 404 pages ulrs from Google crawler
- W3 HTML validator warning Unable to Determine Parse Mode
- Get HTML table td, tr or th inner content value with id or name attribute
- How to word wrap in HTML
- reCaptcha Verification expired. Check the checkbox again
- Adding Sub Headings to Bootstrap Header tags
- Chessboard with pieces using pure HTML and CSS
- How to turn off autocomplete in input fields in HTML Form
- All directional arrows codes for HTML
- Fibonacci series from 1 to 500 table
- W3 : character data is not allowed here html validation error
- How to make a div tag clickable
- Comprehensive 256 Ascii code table with Html Hex IBM Microsoft Key
- HTML5 HELLO WORLD Example
- Create HTML button that looks like a href hyperlink
- How to remove Siri from Menu Bar [macOS Big Sur] - MacOS
- How to fix Microsoft Windows 10 update error 80070020 - Microsoft
- Bootstrap Nav Menu Dropdown on hover - Bootstrap
- Android Parsing Data for android-L failed Unsupported major.minor version 51.0 Error - Android
- How to open a new tab in Notepad++ - NotepadPlusPlus
- Notepad++ Editor alternatives for Mac OS X - NotepadPlusPlus
- Create SharePoint Site Collection with new Content database in existing web application - SharePoint
- Change Height of Android ActionBar - Android