background image shown in preview but not shown when complied

Hello,

I am having an issue with background image. I have added ...


fileview {
    background-image:url(/img/background2.png);
    background-size:100%;
    height:700px;
}


Where fileview is the name of my container. The image is shown in IDE of outsystems I can see it as a background , but when I compile and open in the browser its not shown.



Regards,

Jakub

Solution

Change the URL to be something like url("/{ModuleName}/img/background2.png"), where {ModuleName} is the name of the module that has the image.

Solution

J Borowy wrote:

Hello,

I am having an issue with background image. I have added ...


fileview {
    background-image:url(/img/background2.png);
    background-size:100%;
    height:700px;
}


Where fileview is the name of my container. The image is shown in IDE of outsystems I can see it as a background , but when I compile and open in the browser its not shown.



Regards,

Jakub

Hi J Borowy,

                  

SyntaxEditor Code Snippet

.fileview {
    background-image:url("/Browser/img/BgImg1.jpg");//url of imported  image 
    height:700px;
    background-repeat:no-repeat;
    background-size: cover;
}

fileview use as style class name of container 

Thanks 

soundarya

Thanks for help guys.


leonardo.fernandes tip was helpful , I have added module name in front of url and it displays the image now :)