Author: kavit

0

pseudo elements vs pseudo classes

pseudo elements They allow you to style certain parts of a document. For example, you can style the first letter of each paragraph. MDN list of pseudo elements The following video demonstrates the pseudo...

0

window.onload vs document.onload

window.onload It is fired when the entire page loads, including its content (images, css, scripts, etc.) $(window).load() document.onload It is fired when the DOM is ready which can be prior to images and other...

0

nodejs: generate uuid / guid

node-uuid provide a simpler and reliable way to create unique id. It is rigorous implementation of RFC4122 (v1 and v4) UUIDs. // npm i node-uuid var uuid = require(‘node-uuid’); // Generate a v1 (time-based)...

0

css: margin does not work

Once in a while when two elements with the following criteria has only content (no padding and no border) has vertical margins applied to it When they touch each other the margin collapse to...

0

position: relative

Overview To design and understand the page layouts, we need to understand the position property in css. An element is said to be positioned, when its position attribute is set. position : relative ||...

0

gzip compress and cache api response in express

Browsers are really good at understanding gzipped responses and this creates an opportunity for you to decrease the initial page load time and improve your website’s performance by gzipping all of your API responses....

0

Two column layout in css

In this example, I will illustrate the basic markup necessary for creating two column layout using css. We will give a background color of #cdcdcd to our document so we can see the column...

0

Applying floats to inline elements

Name: float Value: left | right | inherit | none Characteristics : Floating an element will cause it to move to the left-most or right-most edge of its parent container. Floating removes the element...

0

Applying floats and clearfix to block elements

Name: float Value: left | right | inherit | none Characteristics : Floating an element will cause it to move to the left-most or right-most edge of its parent container. Floating removes the element...

2

box-sizing

Name: box-sizing Value: content-box | border-box box-sizing: content-box; In W3C box model, the width and height of an element give the width and height of the content of the element. It excludes the padding...