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 :: best box shadow css 
Css :: padding clamp 
Css :: underline css animation 
Css :: padding right 
Css :: position sticky css 
Css :: import css in another css file 
Css :: css radio button size 
Css :: css not clickable 
Css :: css feather border 
Css :: centos 8 cron on reboot 
Css :: To make card box appear more bigger when hover 
Css :: how center div in css 
Css :: css center text 
Css :: min padding 
Css :: word spacing css 
Css :: transform scale 
Css :: flex align top css 
Css :: text decoration underline not removing 
Css :: rotate image css 
Css :: how to set fallback font in css 
Css :: one image position relative and other absolute 
Css :: css transform translate rotate 
Css :: css3 background image curve 
Css :: how to set image size without changing aspect ratio in css 
Css :: black gradient background effect 
Css :: border image css 
Css :: javafx set border outside 
Css :: add image to div in css 
Css :: grid place between 
Css :: css grid row height with repeat 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =