TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to vertically center a clipped image with CSS

5 pointsby rohanjonabout 10 years ago

3 comments

crimsonalucardabout 10 years ago
An entire article on how to clip an image with a bunch of ugly hacks makes it to the front page of HN. Nothing wrong with the article, but I can't say the same for html and css.
jahewsonabout 10 years ago
CSS already supports this natively via 'clip-path' (or the legacy 'clip').
biturdabout 10 years ago
doesn't work in safari though he talks about adding the safari prefix at the end.