What do the two consecutive points (..) mean in a file path?

11

I still do not understand what this means. Why should I put these two points?

Example: ..\Images/Logo.png

    
asked by anonymous 28.10.2016 / 19:33

3 answers

8
Projeto
   Images
      Logo.png
   CSS
      styles.css

If you are inside the CSS folder using the style.css file and want to access an image that is in a folder at the same level as the CSS folder you do:

../Images/Logo.png

.. means back a folder or level.

../../ back to the Project folder, or the root, depending on its structure.

    
28.10.2016 / 19:51
10

Imagine you are in a structure like this:

/
 css
    estilo.css
 Images
    Logo.png
 Scripts
    ...

That is, in the root of the project have the folders css, Images, Scripts, etc.
If you want the style.css file to access the Logo.png file that is in another folder, the colon followed (..) causes the reference to be the folder above css (/) and then Images.

If you use the css "Images / Logo.png", it means that the "Images" folder should be inside the current folder, which is CSS, the style.css file folder.

I hope you've been able to explain.

    
28.10.2016 / 19:50
7

The denotation .. goes up one folder level.

For example: Your image, Logo.png , is in the Images folder and its arquivo.css in the CSS folder. You use the colon to "get" to the Images folder.

    
28.10.2016 / 19:51