Horje
center on page css Code Example
center div in middle of page
.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  /* bring your own prefixes */
  transform: translate(-50%, -50%);
}
center with css
.parent {
  position: relative;
}
.child {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
center on page css
body {
  display: grid;
  place-items: center;
  height: 100vh;
  margin: 0;
}
css center
// example 1 
div { display: grid; place-items: center; }

// example 3
div{ display:flex; align-items:center; }

// example 3
div { width: 100%; margin: 0 auto; }




Css

Related
bootstrap media queries Code Example bootstrap media queries Code Example
border-radius circle using % Code Example border-radius circle using % Code Example
linear-gradient(top to bottom) Code Example linear-gradient(top to bottom) Code Example
css hover mouse hand Code Example css hover mouse hand Code Example
how to cover entire div with background image Code Example how to cover entire div with background image Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11