Displayed below is the image with a width of 192 and height of 109:
<a href="https://www.blogger.com/u/1/blogger.g?blogID=4402911157743442948#"><img alt="" class="thumbnail" height="109" src="https://2.bp.blogspot.com/-E5ftfbCCgkw/XjnLpO347cI/AAAAAAAAAE8/85xzQpWk1Q8-8A8le4Zj4zPlzs4xCRIcQCLcBGAsYHQ/s1600/1974%2B-%2BKamen%2BRider%2BAmazon%2BEpis%25C3%25B3dios.jpg" width="192"></a>
Incorporated within the image is a .playWrapper
that superimposes a play button. The issue arises when viewing on mobile or other devices where the image size changes but the .playWrapper
width remains fixed since it has to be set manually. Even after attempting width: auto;, the desired effect was not achieved. How can I ensure that the width of .playWrapper
adjusts dynamically based on the image width?
Below is the CSS code for playWrapper:
.overlay .playWrapper{opacity:0;position:absolute;z-index:1;top:0;width:192px;height:109px;background:rgba(0,0,0,0.6) url("http://wptf.com/wp-content/uploads/2014/05/play-button.png") no-repeat scroll center center/50px 50px}