How to change the <img> tag so that I can select an image in CSS?
4 answers
I don’t think you can use pure CSS unless you specify width and height. So just set the width and height in CSS along with your image as a background image and your image. You know what image you use in the theme so that you know its size.
/* Theme1.css */
.ThemeImage
{
background-image: url('imageTheme1.jpg');
width: 150px;
height: 100px;
}
/* Theme2.css */
.ThemeImage
{
background-image: url('imageTheme2.jpg');
width: 300px;
height: 50px;
}
and etc.
+2