3

I have a basic flask app, where I reference background images in my css file like this

.three {
  background:url('/static/images/house.jpg');
}

My folder organization is like this:

project
    app.py
    -static
        -images
            house.jpg
        -css
            index.css
    -templates
        index.html

How do I get my css to properly call the image?

3
  • Does it not work as-is? Commented Nov 6, 2015 at 21:21
  • For some reason it's not picking the images up, everything else works Commented Nov 6, 2015 at 21:21
  • actually there's like a white background covering my text as well, so maybe the css isn't the problem... Commented Nov 6, 2015 at 21:23

1 Answer 1

1

change your css to this, and then try again:

.three {
  background-image: url('images/house.jpg');
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.