Latest Tutorials and How-To's
A multi-row layout where the last DIV needs to be placed at bottom of its parent container can be created using CSS flex, by setting margin-top as auto for the last element.
May 6, 2020
May 4, 2020
A two-column layout, where the first item is aligned to the left, and the second item is aligned to the extreme right, can be created using justify-content CSS flex property.
April 29, 2020
Failed HTTP responses can be handled in fetch() by checking whether the returned Promise was rejected due to a network error. Subsequently the Response.ok property needs to be checked for an invalid HTTP status code.
April 27, 2020
A responsive slider / carousel can be created with CSS flexbox using the order property. Items can be repeated infinitely in a circular loop by changing the order property each time.
April 25, 2020
April 22, 2020
A three-column layout where items are aligned to left, center and right can be created with CSS flex, and using justify-content property.
April 20, 2020
April 13, 2020
A responsive logo can be achieved in a HTML page using the CSS min() function, without involving any media query.
April 5, 2020
March 13, 2020
While applying CSS transform on an image, and scaling it, a common problem comes up that the image becomes blurred. This can be largely improved using the CSS image-rendering property.
March 11, 2020
March 9, 2020
The toLocaleString() method of the Date() object can be used to get date and time for a given IANA timezone name in Node.
February 9, 2020
The newly introduced formdata event can enable the Javscript FormData object to participate in form submissions. When trying to submit a form via AJAX, this is helpful to include custom elements in the request.
February 3, 2020
February 1, 2020
Making the height of a container element same as that of the window is useful in cases where there is a hero content to be presented. This can be done by setting the CSS height of the element in vh units.
January 30, 2020
This article contains sample PHP code that implement the GetObject S3 API call. It will download a file from a S3 bucket, and save it to local server.
January 28, 2020
January 15, 2020
An image can be converted to grayscale or black & white by applying the grayscale CSS filter on it. Even a partial grayscale conversion can be done.
January 13, 2020
January 12, 2020
Intersection Observer Now Also Accepts a Document as the Root Element
Better Caching With stale-while-revalidate Directive in Cache-Control Header
Synchronous AJAX Will Not Work in Page Dismissal Events