I want to to have content like below
for this first one I used line-height 40px
for the second one I used line-height 120px
This means as content varies I have to change the line-heights Is there any way to make this type of centering in a fixed dimensional div without changing the class
Can I do this without Javascript ?
If I use height as 120px I am getting div s like this ( I dont want this )
style of the div is
<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>