New Inheritance Features in CSS

let’s explore the new inheritance features that you may not be aware of and see where these features fit-in well to use and how to use them effectively.Inheritance in CSS is actually very straightforward. Imagine you had to specify the font-size or font-family of every element, instead of simply adding it to the body element? … Read more

Positioning in CSS

If you don’t specify an element’s positioning type, it defaults to <span class="keyword" style="box-sizing:border-box;">static</span>. This just means “where the element would normally go.” If you don’t tell an element how to position itself, it just plunks itself down in the document.Absolute positioningThe first type of positioning is absolute positioning. When an element is set to position: absolute, it’s then … Read more

“display” property in CSS

In this post we will learn four possible values of “display” property in CSS.1. block: This makes the element a block box. It won’t let anything sit next to it on the page! It takes up the full width.2. inline-block: This makes the element a block box, but will allow other elements to sit next … Read more

“Pixel” vs “em” in CSS

A pixel is a dot on your computer screen. Specifying font sizes in pixels is great when you want the user to see exactly on their screen what you designed on yours, though it assumes your screens are of similar size. What if the user is using a screen that’s a very different size from … Read more