I am trying to create a div and add a background image to it in jQuery. For some reason, I cannot do it. If I instead make my background color white, I get a white background. Here is my code:

```
function appendToDom(poster) {
        var aPoster = $('<div>');
        aPoster.css({
                display: 'inline block',
                float: 'left',
                margin: '10px',
                marginLeft: '37px',
                marginTop: '20px',
                width: '200px',
                height: '300px',
                fontSize: '36px',
                color: 'black',
                //backgroundColor: 'white',
                backgroundSize: '200px 300px',
                backgroundImage: './../images/question.png'
            })
            /*
                    $(aPoster).attr("css","background-image: url(~/desktop/MyMovies/public/js/images/question.jpeg)");
                    $(aPoster).attr("css","background-size: 200px 300px");*/
        $(main).append(aPoster);
    }

```

Thanks for all the advice! So I took the suggestions given to me, but it still doesn't work for me.Here is a screenshot of what I have:

[my improved code](https://i.stack.imgur.com/hO7do.png)

NVM I got it! Thanks!