LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Heading with CSS GRID

Heading with FlexBox with Border Top

Heading with FlexBox with Height

CSS
body {
  height: 100vh;
  font-size: 14px;
  background-color: white;
}

main {
  height: 100vh;
  background-color: white;
}
@supports (display: grid) {
  main {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-gap: 1px;
  }
}

h1 {
  text-align: center;
  color: dimgray;
  font-size: 1.6em;
  font-weight: 300;
  padding: 20px;
  background-color: mistyrose;
  margin: 0;
}

@supports (display: grid) {
  .grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-gap: 20px;
    align-items: center;
  }
  .grid:before, .grid:after {
    content: "";
    align-self: center;
    border-top: 1px solid dimgray;
  }
}

.flex {
  display: flex;
  align-items: center;
}
.flex:before {
  margin-right: 20px;
}
.flex:after {
  margin-left: 20px;
}
.flex:before, .flex:after {
  content: "";
  flex: 1;
}
.flex-border:after, .flex-border:before {
  border-top: 1px solid dimgray;
}
.flex-height:after, .flex-height:before {
  height: 1px;
  background-color: dimgray;
}
Term
Sat, 04/14/2018 - 20:48

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv