Can I add alt tag to custom css?

(Gary Loch) #1

Is it possible to add alt text to custom css in this instance:{
background:url(%resource(photo-name.jpg)%) 50% 50% repeat; background-size:cover;


(Jannis from inStacks Software) #2

No. Further more, alt tag is a property for img.

(Gary Loch) #3

Thanks for your reply! OK, is there a way to add an alt description in the above instance?

(Jannis from inStacks Software) #4

alt text can only be added to img tags. You have there n background image, so you are not able to add an alt tag there.

Are you able to change the code of the HTML element, which has applied the CSS class

(Gary Loch) #5

I think that is beyond my skill set. I’m using Aptenon theme and the custom CSS refers to a banner image that is different on each page:

(Jannis from inStacks Software) #6

The question is, why you want to add an alt text to a background image?