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
CSS
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
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
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
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
“Cascading” refers to the process of going through the style declarations and defining the weight or importance of the styling rules that help the browser to select what rules have to be applied in times of conflict. The conflict here refers to... 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 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
Opacity refers to the degree to which the content is transparent or opaque. We can use the property named opacity which takes the values ranging from 0 to 1. 0 specifies that the element is completely transparent where 1 means that the element is... Read More
The float property is used for positioning the HTML elements horizontally either towards the left or right of the container. For instance, float-demo { float: right; } Here, the element to which the class is applied ensures that the element is... Read More