The :target selector allows us to interact with a fragment identifier, or hash, in our URL from CSS. HTML: <body> <a href="#tab1">Tab 1</a><a href="#tab2">Tab 2</a><a href="#tab3">Tab 3<…
The CSS :not() selector allows us to exclude a subset of elements matched by our selector. In this example we refactor two selectors down to one using the CSS :not() selector. .FruitList li:not(:nth-child(2)) { border-bottom: 1px solid red; }…
CSS3 & CSS var & :root How to change CSS :root color variables in JavaScript https://stackoverflow.com/questions/37801882/how-to-change-css-root-color-variables-in-javascript https://developer.mozilla.org/en-US/docs/Web/CSS/:root :root { --angleBe…
You can target an element that has no child elements by using the :empty pseudo-class. With browser support down to IE9, it's solid, easy way to select empty elements without any additional markup. Be aware that whitespace is considered a "child"…
Using CSS media queries allows you to design responsive layout in your web apps and website. We will go over the media query basics in this lesson. body{ background-color: limegreen; } /* @media not|only mediatype and (expression) CSS-Code */ @media…
Understanding the most common CSS display types of block, inline-block, and inline will allow you to get the most out of your HTML and use CSS Frameworks like Bootstrap to their fullest. Takeway: Inline: Can NOT add height and width. But can add marg…
Body with background image and gradient html { background: linear-gradient(#000, white) no-repeat; height: 100vh; } Body with elaborate background using only CSS background-image: url("img_tree.gif"), url("paper.gif"); Using CSS backgr…