I am new to HTML and CSS . I have an image inside an tag
<ins style="
background-color: green;
"><img alt="image" src="image1.jpg"></ins>
I can see the green line under the image only . I want the green background color to applied on the whole image . So my whole image and the green color should be visible. I tried on channging width to 100% of ins tag. (https://i.stack.imgur.com/a4U0z.png)] I want to achieve this green color to applid on whole image.
CodePudding user response:
Hi @chirag gupta,
This is simple and I am adding a modified code since you're new to HTML and CSS. Add style "position: absolute;" in the "ins" tag.
<ins style="background-color: green;position: absolute;">
<img alt="image" src="https://cdn.cloudflare.steamstatic.com/apps/dota2/videos/dota_react/heroes/renders/faceless_void.png">
</ins>
Hope this helps you out.