.hoverinfo { cursor: pointer; padding: 5px; margin-bottom: 30px; margin-right: 5px; margin-left: 5px; width: 31%; display: inline-block; max-width: 300px; } .hoverinfo p { display: none; color: #000000; } .hoverinfo:hover p { background-color: rgb(252, 210, 191); display: -webkit-box; position: absolute; padding: 10px; box-shadow: 5px 5px 0px darkgrey; vertical-align: top; width: 33%; margin-top: -41px!important; z-index: 100000; }