Search
 
SCRIPT & CODE EXAMPLE
 

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>
Comment

center text horizontally and vertically inside a div in css

.parent{ 
  display: grid;
  place-items: center;
}
Comment

PREVIOUS NEXT
Code Example
Css :: break sentence css 
Css :: how to allow scroll in div 
Css :: mobile responsive css 
Css :: downgrade composer to 1 in vagrant 
Css :: calc sass variables 
Css :: css space between elements 
Css :: how to make border blur css 
Css :: how to put element in center in html 
Css :: css vertical align items in div 
Css :: linear-gradient(top to bottom) 
Css :: css animation scale image 
Css :: css change image color 
Css :: center anything horizontally and vertically in CSS 
Css :: css make text not highlightable 
Css :: change scroll style angular 
Css :: css grid wrap columns 
Css :: css disable scroll mobile 
Css :: install cors 
Css :: align center 
Css :: how to make borders rounded in css 
Css :: react app css add background image 
Css :: css margin bottom 
Css :: div align right in css 
Css :: scroll tbody fixed thead 
Css :: background-image linear gradient and border radius 
Css :: restrict flex items in a row 
Css :: decrease space between paragraphs html 
Css :: font awesome pseudo element 
Css :: set distance between text and underline 
Css :: css hiddden 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =