.result-content { color: darkgray; overflow-wrap: anywhere; } .doc-img { object-fit: cover; object-position: top; height: 100%; position: absolute; }