::before and ::after selectors in css

Summary The CSS ::after pseudo-element matches a virtual last child of the selected element. Typically used to add cosmetic content to an element, by using the content CSS property. This element is inline by default. Syntax How to read CSS syntax. element:after { style properties } /* CSS2 syntax */ element::after { style properties } […]

Rate this:

CSS Selectors

It explains How to use different signs (+,> and ~) in CSS selector and their differences. Before starting, let us take a sample code to understand the signs. <div id=”container”>               <p>First</p>     <div>         <p>Child Paragraph</p>     </div>    <p>Second</p>    <p>Third</p>      </div> div#container p{ font-weight:bold; } It is the descendant selector. It will target […]

Rate this: