-2

After trying a gruesome lot of time I am still not gaining the correct co-ordinates or pixels to clip/crop out my image

the image:

https://i.stack.imgur.com/y4L2T.jpg

I want to clip out the right and left white portion of the image.Thanks.

Enigma
  • 19
  • 3

1 Answers1

-1

Is this what your wanting? The clip property does NOT CHANGE THE IMAGE SIZE!

img {    
    position: absolute;
    clip: rect(58px 416px 532px 184px);
}
body {
  background-color: #000;
}
<img src="https://i.stack.imgur.com/y4L2T.jpg">

I really think this is what you want:

div {
    position: relative;
    height: 475px;
    width: 234px;
    overflow: hidden;
}
img {    
    position: absolute;
    left: -183px;
    top: -58px;
}
<div>
<img src="https://i.stack.imgur.com/y4L2T.jpg">
</div>
S. Walker
  • 2,129
  • 12
  • 30