How to add a repeating png image in the background of a webpage using CSS?

ledzee

I am using the following CSS code:

body  
{
    background-image: url(img/tasky_pattern.png);  
}

My image address is downloads/dist/image/tasky_pattern.png. I have no idea where I am going wrong and how to correct this.

Thanks.

ocajian

The image you are link to img/tasky_pattern.png is under a folder called downloads/dist/image/tasky_pattern.png but you used img instead of image

Have a look at fixing that typo. This is probably why your image is not showing.

To check your file references open your page in chrome and inspect element. Find the css code that says background-image: url(img/tasky_pattern.png); and then navigate to the destination. This will give you the full url in your browser address bar and will show you where you went wrong with your path name

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to use an SVG as a responsive repeating webpage background?

From Dev

How to add a colored background to PNG or add a Color overlay to an Image?

From Dev

Add background image using Javascript CSS property

From Dev

How can I add a background to my png image?

From Dev

How can I add a background to my png image?

From Dev

How to set opacity to png image with transparent background using Magick++

From Dev

Using a background image CSS

From Dev

How to set repeating background image to a JPanel?

From Dev

Add css background image in node.js using express

From Dev

How to add a background image

From Dev

Using SVG with referenced PNG as background image

From Dev

Add a background image through css

From Dev

How to show a background image over foreground image using CSS

From Dev

How do I add a background image on my DIV tag with CSS

From Dev

image sprites as background on webpage

From Dev

How to add Button over image using CSS?

From Dev

How to add an image to a transparent box using css

From Dev

How to add an image to a transparent box using css

From Dev

How to add different background image (.png) to a SVG circle shape , and set stroke?

From Dev

How to keep transparent background in a png image

From Dev

Displaying a background image on webpage behind existing content with CSS

From Dev

Add background image using php

From Dev

Merge background image using CSS

From Java

How to add background-image using ngStyle (angular2)?

From Dev

How do I add a background image and label to a UIBarButtonItem using Swift

From Dev

How to add a background image to a plot created using D3

From Dev

How to add background-image to AnchorPane by using Scene Builder in JavaFX?

From Dev

How to add background-image to AnchorPane by using Scene Builder in JavaFX?

From Dev

How to add a background image to a JFrame with no panels, without using a JLabel?

Related Related

  1. 1

    How to use an SVG as a responsive repeating webpage background?

  2. 2

    How to add a colored background to PNG or add a Color overlay to an Image?

  3. 3

    Add background image using Javascript CSS property

  4. 4

    How can I add a background to my png image?

  5. 5

    How can I add a background to my png image?

  6. 6

    How to set opacity to png image with transparent background using Magick++

  7. 7

    Using a background image CSS

  8. 8

    How to set repeating background image to a JPanel?

  9. 9

    Add css background image in node.js using express

  10. 10

    How to add a background image

  11. 11

    Using SVG with referenced PNG as background image

  12. 12

    Add a background image through css

  13. 13

    How to show a background image over foreground image using CSS

  14. 14

    How do I add a background image on my DIV tag with CSS

  15. 15

    image sprites as background on webpage

  16. 16

    How to add Button over image using CSS?

  17. 17

    How to add an image to a transparent box using css

  18. 18

    How to add an image to a transparent box using css

  19. 19

    How to add different background image (.png) to a SVG circle shape , and set stroke?

  20. 20

    How to keep transparent background in a png image

  21. 21

    Displaying a background image on webpage behind existing content with CSS

  22. 22

    Add background image using php

  23. 23

    Merge background image using CSS

  24. 24

    How to add background-image using ngStyle (angular2)?

  25. 25

    How do I add a background image and label to a UIBarButtonItem using Swift

  26. 26

    How to add a background image to a plot created using D3

  27. 27

    How to add background-image to AnchorPane by using Scene Builder in JavaFX?

  28. 28

    How to add background-image to AnchorPane by using Scene Builder in JavaFX?

  29. 29

    How to add a background image to a JFrame with no panels, without using a JLabel?

HotTag

Archive