The order of matching selectors goes from right to left of the selector expression. The elements in the DOM are filtered by browsers based on the key selectors and are then traversed up to the parent elements for determining the matches. The speed of... Read More
CSS
There are 5 types of CSS position properties. They are: Absolute: To place an element exactly where you want to place it. The absolute position is actually set relative to the element's parent. If no parent is available then the relative place... Read More
A CSS Preprocessor is a tool used to extend the basic functionality of default vanilla CSS through its own scripting language. It helps us to use complex logical syntax like – variables, functions, mixins, code nesting, and inheritance to name a... Read More
content-box is the default value box-sizing property. The height and the width properties consist only of the content by excluding the border and padding. Consider an example as shown: div{ width:300px; height:200px; padding:15px; ... Read More
We can use the font-family property for achieving this. The font-family property is used for specifying what font needs to be applied on the targetted DOM element. It can hold several font names as part of the “fallback” mechanism in case the... Read More
There are four ways to center align a <div> element inside another <div> element. Centering with Table HTML: <div class="cn"><div class="inner">your content</div></div> CSS: .cn { display: table-cell; width:... Read More
div, p div p div ~ p div + p div > p The meaning of the given list of selectors goes as follows: div, p: This selector implies selecting all div elements and all p elements. Consider an example below: <h1>Heading 1</h1> <div>... Read More
There are different ways to specify units in CSS like px, em, pt, and percentage (%). px(Pixel) gives fine-grained control and maintains alignment because 1 px or multiple of 1 px is guaranteed to look sharp. px is not cascade. em maintains relative... Read More
A CSS selector is the part of a CSS ruleset that actually selects the content you want to style. Different types of selectors are listed below. Universal Selector The universal selector works like a wildcard character, selecting all elements on a... Read More
z-index is used for specifying the vertical stacking of the overlapping elements that occur at the time of its positioning. It specifies the vertical stack order of the elements positioned that helps to define how the display of elements should... Read More