I want to create a square box using CSS of given size. Then add a paragraph of text inside the square and then center the text horizontally in square.
Here is my code:
#myid {
  width: 100px;
  height: 100px;
  text-align: center;
  vertical-align: middle;
}
#myid:after {
  content: 'hello';
}<div id="myid" />The issue is I am able to get the square with text hello centered horizontally but not in the middle of the square.
How to fix this issue?
 
     
    