alt text

body {margin: 0; }

#head{ height: 150px; /* Высота блока */ width: 100%; /* Ширина блока */ background: red; opacity: 0.8; } <link rel="stylesheet" type="text/css" href="../resources/css/main.css"> 

I connect like this, it does not work. All the same styles before that lay in the html itself - everything worked. Prompt how to register the path.

    2 answers 2

    You have almost correctly, you only need to level up:

     ../../resources/css/main.css 
    • It does not work: (Although everything is logical, it should work. From the styles, when all this was in html, I referred to images ./resources/image/fon.png - alex91
    • <link rel = "stylesheet" type = "text / css" href = "resources / css / main.css"> it worked, I don’t understand what the logic is - alex91
    • @ alex91, it all depends on the logic of spring , apparently, the main html file is saved to the webapp folder - Crasher
    • and from css to images, this is the only way it works now :) background: url (../../ resources / image / mainfon.png) - alex91
    • The logic here is simple, remember the command Change Directory (CD or CHDIR) parameter ".." in it means a level up, here and walk in directories, at least where. - I_CaR

    ".." is a higher level. "/" - enter the folder / file.