Skip to Content

Style.css is in css directory and "abc.jpg" is in "mockdata" folder.

I have added following lines to add background image:

.wholepage{ background-image: url('../mockdata/abc.jpg'); }

here my question is- why i need to give double dot?.Though it is working fine.I am surprised why it is not working with single dot?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 07, 2019 at 05:09 AM

    Dear Ankita,

    ../ denotes one level up in directory structure it's a universal convention defined, so that everyone follows it. dot slash does not denotes it.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.