Clearing a form is something that you often need to do on a website, for example if you want to empty the form fields after submitting a form with Ajax. Resetting a form using JavaScript is pretty straightforward, you can just call: document.getElementById("#myform").reset(); But calling …
I love reading interesting books. But it was’t always like that. It’s only a couple of years ago since I really began to take reading seriously. In 2015, I set up a reading goal on Goodreads of reading 26 books. And just a few days before New Year’ …
When the margins of two adjacent elements are collapsed—or combined—into just a single margin, we call this behavior margin collapsing. The final margin size will be equal to the largest of the two margins. For example, if an element with a 20px margin collapses with an element with …
There are 3 different properties you can use to hide an element with CSS. While all 3 properties makes an element hidden, each property works in a slightly different way. Knowing the differences will make it easier for you to make the right choice. Here’s a graphic summarizing what …
Getting the footer of a website to always stick to the bottom of the page, regardless of the content’s length, used to be a hassle. With Flexbox, making a sticky footer is easy, and requires only a few lines of code. For those of you unfamiliar with flexbox, it …