Category: Fundamentals

0

css : center element vertically and horizontally

CSS transform allows us to modify the coordinate space of any element. transform can have one of the following functions as its value : rotate skew scale matrix translate perspective Using the translate function...

0

css – circular profile pictures

Nowadays, circular profile pictures are very popular. It’s really simple to create the circular profile picture from a given square image using border-radius. Following example, renders an original square image as well as the...

0

css – vertically align text

Let’s see the example on horizontally aligning the text using text-align: center as shown in the below pen. [codepen_embed height=”345″ theme_id=”0″ slug_hash=”ONEPKQ” default_tab=”css,result” user=”kavitshah8″]See the Pen horizontally-aligned by Kavit Shah (@kavitshah8) on CodePen.[/codepen_embed] To...

0

querySelector vs getElementById

Get Element By Id It returns a node list which is live, meaning if you add or remove any element from the DOM the node list will update It is faster relative to the...

0

window vs document

Web browser is made up of hierarchy of objects. At the root level we have a window object. Window It is the root level element in any web page. All the global variables are...

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...