Month:

January 2018

The CSS :checked Pseudo-Class Selector

:checked is a pseudo-class selector that’s used to style the checked state of radio, checkbox or option elements: :checked { background-color: hotpink; } /* Only style checked checkboxes */ input[type=”checkbox”]:checked { padding-left: 1em; } ? Recommended course ⤵ Advanced CSS and Sass: Flexbox, Grid, Animations and More! Explicit styling unchecked elements You can use the …
Read more

The CSS Box Model

New to CSS? The first order of business is to understand how the box model works. Every element on a page should be seen as a box, with possible paddings, borders and margins. Here’s how it gets applied: ContentPaddingBorderMarginTopBottomRightLeft Note that if you apply a box-shadow to an element that’s not an inset box shadow, …
Read more