-
Horizontally align HTML header elements using CSS
While there are various different ways to horizontally align items using CSS, the best way forward is to use the flexbox layout. In order to use CSS flexbox property efficiently, you have to use elements or tags inside of other elements or tags. The flex property works only if you have elements or tags like…
-
Remove Bullet Points and Underline – CSS
You can easily remove bullets from unordered or ordered lists and underlines from anchor tags in HTML using certain CSS rules. Example Let’s see how to achieve this with an example : In the above code snippet, we’ve three links inside of anchor tags. By default you’ll have underlines beneath them and bullet points before…
-
What is a Descendant Combinator in CSS?
Descendant combinator is a parent-and-child selector in CSS. In this, a child element will be selected only when there’s a parent element present. Another way to put it is that it will select a child element only if it’s nested inside a parent (or ancestor) element, no matter how deep down the nested element is.…
-
Grouping Selectors vs Chaining Selectors in CSS
Grouping Selectors Say there are two groups of HTML elements which should have the same CSS style declarations added to them, for example the same background-color and text-color. In order to cut things short, we use grouping selectors to avoid repetitions. Let’s take a simple example with and without grouping: : Though the both codes…
-
What is the exact order of precedence in CSS?
In CSS, the rule of precedence is actually very simple and straight forward. Those CSS codes which are more specific to a certain situation takes precedence over the less specific code declarations. Now as a general rule of thumb, this is the exact order of precedence (1 the most,6 the least): In short, this is…