Comments on: object-position https://css-tricks.com Tips, Tricks, and Techniques on using Cascading Style Sheets. Mon, 24 May 2021 14:27:30 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: Steven https://css-tricks.com/almanac/properties/o/object-position/#comment-1762602 Fri, 11 Sep 2020 16:02:33 +0000 http://css-tricks.com/?page_id=194885#comment-1762602 I have a full screen image on my website. I want it to adapt based on the screen resolution/ratio but I have some constrains:

I always have to see the right part of the image (only crop what is
on the left)
I cannot crop the height.

I have tried without any success to use:

text-indent: -100%;
object-position: right;
object-fit: contain;
but no combination works.

Thank you for any help

]]>
By: Ben https://css-tricks.com/almanac/properties/o/object-position/#comment-1760046 Wed, 15 Jul 2020 13:36:58 +0000 http://css-tricks.com/?page_id=194885#comment-1760046 No mention that you can use same notation as background-position
‘object-position: left bottom;’

]]>
By: Serban https://css-tricks.com/almanac/properties/o/object-position/#comment-1610015 Thu, 06 Jul 2017 14:22:55 +0000 http://css-tricks.com/?page_id=194885#comment-1610015 I’m a bit late here, but I have an amend: third example should say object-position: 100% 100% (instead of 100% 150%), while fourth one should say object-position: 0 100% (instead of 0 150%).

]]>
By: Dan Johnson https://css-tricks.com/almanac/properties/o/object-position/#comment-1606005 Mon, 09 Jan 2017 03:36:58 +0000 http://css-tricks.com/?page_id=194885#comment-1606005 In reply to Marek.

Safari 10 (macOS and iOS) now properly support both object-fit and object-position.

]]>
By: Stian Jensen https://css-tricks.com/almanac/properties/o/object-position/#comment-1602187 Tue, 14 Jun 2016 15:09:44 +0000 http://css-tricks.com/?page_id=194885#comment-1602187 In reply to Marek.

Safari 10 supports object-position:
https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html

(Also, the codepen is a 404 now)

]]>
By: Robin Rendle https://css-tricks.com/almanac/properties/o/object-position/#comment-1599371 Fri, 29 Jan 2016 11:02:25 +0000 http://css-tricks.com/?page_id=194885#comment-1599371 In reply to Marek.

Thanks Marek, I’ve updated the post with the right info now.

]]>
By: Marek https://css-tricks.com/almanac/properties/o/object-position/#comment-1599370 Fri, 29 Jan 2016 10:31:27 +0000 http://css-tricks.com/?page_id=194885#comment-1599370 The browser support is wrong for Safari, which doesn’t support object-position at all.
http://caniuse.com/#search=object-position

]]>
By: Name https://css-tricks.com/almanac/properties/o/object-position/#comment-1596598 Wed, 26 Aug 2015 05:20:21 +0000 http://css-tricks.com/?page_id=194885#comment-1596598 function example() {
element.innerHTML = “what the hell?”;
}

]]>