Forum How do I...?

How do I vertically centera a small text on a page? #CSS

LeifHalvardSilli
Hi

I try to create a booklet with small diary notes.

I would like each note to be vertically centered on the page.

Is there a simple way to do this? Or even a complicated way ... ?
dauwhe
	@page {
	  size: 10cm 15cm;
	  margin: 1cm;
	}
	.container { 
	  display: flex;
	  justify-content: center;
         align-items: center;
         height: 13cm; /* height of content area of page */
         border: thin solid red;
	}
	.center {
	 align-self: center;
	}
  1. center.html0.5 kB