oTree Forum >

set a saved image as backgornd of my button cards

#1 by AJafarzadeh

I have some button cards in my app and in the face of each card there is a number. I want to set a save image on computer as background of the card button. Once I want to use style="background:  " it wants url which is related to online picture not a saving picture. What should I do for set a saved image as my background? I would be thankful if you could help me out. 

my code for button cards are as follows: 
{{ for card in cards_uf }}
                <div class="container">
                <button type="button" value="{{ card }}" class="btn-card" style="height: 201px; width: 125px">
                    {{ card }}
                </button>

            </div>

** {{card}} is a random number for each card. 
*** my aim is to design a card where there is number on it and clickable and there is an image of a card as background (like diamond, etc.). I am writing it, in the case there is another way to do that.

Write a reply

Set forum username