CSS Background Image not loading

  • Hi I have created a css class which is loading an image asset

    .donut-container {
        background-image: url("{#asset /Intelli-Sense-Monthly-Report/pdf_donut_banner.png @encoding=dataURI}"); 
        width: 755px;
        height: 100px;

    For some reason my template isn't loading the background image onto the page, if i use the following code the img is loaded.

    <img src="{#asset /Intelli-Sense-Monthly-Report/pdf_donut_banner.png @encoding=dataURI}" />

    Am I doing something wrong when loading the background image onto the page? the HTML code which should show that image is below

    <div class="donut-container"></div>

    Thank you for any help. :)

  • administrators

    hi! hmm your code looks correct i've tried to replicate the same here and it works. maybe you can try it to replicate in the playground also and share the link back here

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.