Flexbox stands for flexible box and it was introduced around 2017 in CSS with the purpose of providing an efficient way to handle layouts, align elements within them and distribute spaces amongst the items in dynamic/responsive conditions. It... Read More
CSS
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
It is a CSS unit used to measure the height and width in percentage with respect to the viewport. It is used mainly in responsive design techniques. The measure VH is equal to 1/100 of the height of the viewport. If the height of the browser is... 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
“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
There are different ways to include a CSS in a webpage, 1. External Style Sheet: An external file linked to your HTML document: Using a link tag, we can link the style sheet to the HTML page. <link rel="stylesheet" type="text/css" href=... 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
Pseudo-elements allows us to create items that do not normally exist in the document tree, for example ::after. ::before ::after ::first-letter ::first-line ::selection In the below example, the color will appear only on the first line of the... 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
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