Created
August 14, 2013 17:57
-
-
Save devluis/6233667 to your computer and use it in GitHub Desktop.
Hide part of image with css without cropping image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .container { | |
| width: 418px; | |
| height: 240px; | |
| overflow: hidden; | |
| } | |
| .container img { | |
| width: 100%; | |
| } | |
| </style> | |
| <div class="container"> | |
| <img src="http://your-source.com" alt="alt" title="title"/> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i did try that and tried to adapt to every possible viewpoint width, but the reason i am posting this reply means that it didn't work.
the image:
