Avatar of Stefan Motz
Stefan Motz
Flag for United States of America

asked on 

Adding image location in CSS

Hi Experts,
I'm trying to replace Less Than and Greater Than signs in my CSS with images:
.menu-label::after { content: ">"; }
#menu-toggle:checked + .menu-label::after { content: "<"; }

Open in new window

I tried replacing them with the image location, but it didn't work, it just wrote out thew whole string.
.menu-label::after { content: "background-image: url('../../../../../assets/images/gt.jpg');"; }
#menu-toggle:checked + .menu-label::after { content: "background-image: url('../../../../../assets/images/lt.jpg');"; }

Open in new window

Is there a way to do it? I would appreciate your help.

Avatar of undefined
Last Comment
Sam Jacobs

8/22/2022 - Mon