My div
element is narrower than the image it contains, and I've set the overflow property to hidden. As a result, only a portion of the image is visible from the left side.
However, I would like to see a portion of the image from the right side instead.
HTML:
<div id="my_div">
<img src="some_image.jpg" width="600" />
</div>
CSS:
#my_div {
position: relative;
width: 300px;
overflow: hidden;
}
Currently, only 50% of the image is visible from the left side. I am looking for a way to make 50% of the image visible from the right side without displaying the entire image. Is there a solution that doesn't involve setting the CSS properties to 'position: absolute' and 'right: 0px'?
EDIT:
Unfortunately, I am unable to apply the following CSS:
position: absolute;
right: 0px;
Are there any alternative solutions available?