Here is a method to make div or any other HTML element/tag scroll down to the bottom on a page load. The script uses the jQuery library. jQuery Code / Logic Used $(window).on(‘load’, function(){ sh = $(“#element”)[0].scrollHeight;...
I think this function is very important and included by almost all websites nowadays with medium to long page lengths. As a user, it feels very tedious to scroll up to the top of websites once we have scrolled down to the bottom of a long page. The function is written...
Autofill usually changes the background color but in some areas, we don’t want that default color, so this script is to change the default color. Just add the following pseudo-selector to your style sheet and the background color will change according to your...
Portrait and landscape media queries for mobiles and ipads in css? Here is Portrait and landscape media queries for mobiles and ipads in CSS. CSS Media Query for Portrait Orientation @media screen and (max-device-width: 767px) and (orientation: portrait) {...
CSS Slider / Carousel Here is a slider/carousel built with pure CSS with an auto slide function. The slider stops if we try to change the slide manually showing the button at the bottom to restart it. Personally, I really liked this CSS-only slider but the CSS script...