• Skip to main content
  • Skip to primary sidebar

Web Development Archive

  • Archive
You are here: Home / Archives for CSS

CSS

CSS Hover Effect with Grayscale and Zoom

Filed Under: CSS Tagged With: hover

Font Awesome – Chevron Right

.chevron li{
     position: relative;
     list-style: none !important;
     margin: 0 !important;
     border-bottom: 1px solid rgba(255,255,255,.2);
     margin-bottom: 4px !important;
 }
 .chevron li::before{
     position: absolute;
     content: '\f054' !important;
     font-family: 'Font Awesome 5 Free';
     left: -25px;
     font-weight: 900;
 }

Filed Under: CSS Tagged With: FontAwesome

How to add stickey footer with CSS

Wrap all content right above the footer element, set the min-height calc function to 100% of viewport height minus the footer height:

.wrap{
     min-height: calc(100vh - 100px);
 }

Filed Under: CSS

CSS Display the title attribute with ::after pseudo selector

Title attribute

a::after {
   content: attr(title);
   display: inline-block;
   color: initial;
   font-size: .65em;
   margin-left: 5px;
 }

Href attribute

a::after {
   content: attr(href);
   display: inline-block;
   color: initial;
   font-size: .65em;
   margin-left: 5px;
 }

Filed Under: CSS Tagged With: selectors

CSS Select the first line and first letter

.intro:first-line{
     font-weight: bold;
 }
 .intro:first-letter{
     font-size: 80px;
     color: tomato;
 }

Filed Under: CSS Tagged With: selectors

CSS Select every element except the first or last child

Select every element except the first-child

li:not(:first-child){ }

Select every element except the last-child

li:not(:first-child){ }

Filed Under: CSS Tagged With: selectors

CSS Selector :root / :target

Selects the root element of the document in the case of HTML

:root { background: yellow; }

Selects an element with an ID matching the current URL’s fragment

:target { border: 2px solid black; }

Filed Under: CSS Tagged With: selecltors

CSS Select the 4th then every 3th element

img{
     float: left;
 }
 img:nth-child(3n+4){
     clear:left;
     border-color: tomato;
 }

Filed Under: CSS Tagged With: selectors

CSS Selector – div:nth-of-type

Select the 4th element of one specific type

div:nth-of-type(4){ }

Filed Under: CSS Tagged With: selectors

CSS Select every 2nd, 3rd element – even / odd

Select every 2nd element

li:nth-child(even){ }
li:nth-child(odd){ }

Select every 3rd element

li:nth-child(3n){ }

Filed Under: CSS Tagged With: selectors

  • « Go to Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Go to Next Page »

Primary Sidebar

  • angular.io
© 2026 WP Flames - All Right Reserved