I want to have content as below
for this first i used a line height of 40px
for the second I used line-height 120px
This means that when changing the content I need to change the line height. Is there a way to do this type of centering in a fixed dimensional div without changing the class
Can I do this without Javascript? If I use height like 120px, I get div s like this (I don't want this) 
div style -
<style> .rectangle { postion:absolute; box-shadow: 10px #333; border-radius: 23px; border-top-right-radius: 0; border:6px solid; block:inline; line-height: 123.6px; width:200px; background-color: #444; float: left; margin: 5px; text-align: center; color:white; font-weight:900; text-decoration:none; } </style>
source share