CSS


SNIPPETS

Align images

.imgV {
  vertical-align: middle;
}
.imgH {
  display: flex;
  margin: 0 auto;
  max-width: 100%;
}
a, a:visited {
  text-decoration: none;
  color: #375EAB;
}
a:hover {
  color: lightblue;
}
div:hover {
  transform: scale(1.2);
}
  • Negate link
a.notYet {
  pointer-events: none;
  text-decoration: line-through;
  color: #404040;
}

Gradual hr

hr {
  margin: 10px 10% 10px 10%;
  border: 0;
  height: 1px;
  background: #333;
  background-image: linear-gradient(to right, #ccc, #888, #ccc);
}

Chrome problem with list bullets

ul {
  text-align: center;
  /* to avoid bullets */
  display: inline;
  /* Chrome numbers of ol inside text */
  list-style-position: inside;
  list-style-type: none;
}

html {
  height: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  position: relative;
  margin: 0 auto;
  /*padding-bottom: 6rem;*/
  min-height: 97%;
}

.footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1rem;
  background-color: lightblue;
  text-align: center;
}

font-size browser

html {
  font-size:16px;
}

/* 
Now em and will get consistent result in firefox and chrome
*/

body {
  font-size:0.90em;
}