Last post Jul 31, 2017 09:03 AM by Eric Du
Jul 28, 2017 03:05 PM|snowfun87|LINK
I'm currently creating a style for a website using stylish, a google chrome plugin.
One of the things i wanted to do was change the image of some elements for the theme im creating.
But i only recently found out that the image is coded into html with the img tag, not CSS as a background or background-image property.
Stylish only allows you to use CSS when coding styles,
and as far as i know, you cannot edit html with CSS,
So how could i change a image that is coded in html with CSS? If at all??
Jul 28, 2017 03:19 PM|PatriceSc|LINK
And you are not allowed to change the HTML markup? Try perhaps https://css-tricks.com/replace-the-image-in-an-img-with-css/ but talk with the site owner if you can.
Jul 28, 2017 03:21 PM|A2H|LINK
only recently found out that the image is coded into html with the img tag, not CSS as a background or background-image property
You should be able to use background css property to add images to html page
background: url("http://i.imgur.com/oqYwen1.jpg") !important;
Jul 31, 2017 09:03 AM|Eric Du|LINK
According to your description, as far as I know, you could use the following code to set the background image:
I think you could refer to the following tutorial about setting img attribute: