.content{ width: 100%; max-height: 200px; overflow: hidden; outline: 2px dashed #ddd; -webkit-mask: linear-gradient(red 150px, transparent 200px); } .content label{ float: right; width: 100px; text-align: center; position: relative; left: calc(50% - 50px); transform: translateY(-100%); cursor: pointer; }