Positioning in CSS

If you don’t specify an element’s positioning type, it defaults to static. 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 positioned in … 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