Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

Center text horizontally and vertically

/* CSS */
.text-center-vh { 
  display: grid;
  place-items: center;
}

<!-- HTML -->
<div class="text-center-vh">
	<h1>Center Text</h1>
</div>
 
PREVIOUS NEXT
Tagged: #Center #text #horizontally #vertically
ADD COMMENT
Topic
Name
9+9 =