LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

A heading

A heading longer than the subsequent heading

This is a short sub-heading

This is a heading

This sub-heading is longer than the preceding heading

CSS
* {
  box-sizing: border-box;
}

h1 {
  display: grid;
  font-size: 4em;
  grid-gap: .5em;
  grid-template-columns: 1fr auto 1fr;
  text-align: center;
}

@supports (display: grid) {
  
  h1:before, h1:after {
    align-self: center;
    border-top: double .25em #ccc;
    content: "";
  }
  
}

header {
  background: #800080;
  display: grid;
  grid-template-columns:
    minmax(1em,1fr)
    minmax(min-content,max-content)
    minmax(1em,1fr);
  margin: 1em 0;
}

header > * {
  grid-column: 2;
}

h2, h3 {
  border: solid 2px #fff;
}

h2 {
  background: #aa55aa;
  border-bottom: 0;
  color: #fff;
  font-size: 2.5em;
  letter-spacing: .05em;
  line-height: 1.2;
  margin: 0.5em 0 0;
  padding: 0.25em;
  text-align: left;
}

h3 {
  background: #f0e2f0;
  border-top: 0;
  color: #630063;
  font-size: 1.25em;
  font-style: italic;
  margin: 0 0 1em;
  padding: 0.5em;
  text-align: left;
}

.centered h2, .centered h3 {
  text-align: center;
}
Term
Sat, 04/14/2018 - 20:48

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv