9 Replies
Don't you miss / in front of images inside url?
/images/...
tried but did not maken any difference
The url needs to be based on the location of the html file. Did you check that?
The screenshot shows that the images folder is not inside of components. It looks like two levels up, so the url probably should be "../../images/bg-main-desktop.png"
but it is in my public folder
The error message shows that it is looking for the images folder inside of src.
whenever i do not use background images it and used simple image using <img> it worked but for background is the only problem
I found the easiest way to add a background image while using Tailwind is to create a class in your globals.css file and then add that class to your element.
or you could add the image to the Tailwind config file
I hope this is somewhat usefull or is there a specific reason you need it added in that particular way?
thanks