Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to center horizontally and vertically block div

#html code
<div class="parent">
	<h1 class="child">CSS is cool</h1>
</div>

#css code
.parent{
  display:grid;
  place-items:center;
  
  width:560px; 
  height: 560px;
}
Source by www.markuptag.com #
 
PREVIOUS NEXT
Tagged: #center #horizontally #vertically #block #div
ADD COMMENT
Topic
Name
2+7 =