0

So this is my layout for most of my pages:

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./css/style.css" />
    <title>{{title}}</title>
    </head>

my css is in a different folder , and some of the css for certain page such like my home looks something like :

.home-banner {
  width: 100%;
  background-image: url(home-banner6.jpg);
  height: 170px;
  background-size: cover;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

Do i just put it like that in .css? Heres an image of my directory as well. enter image description here

j08691
  • 204,283
  • 31
  • 260
  • 272
  • 1
    when you point the url: `home-banner6.jpg` it means that the image is on the same place where the css is. – A. Meshu Apr 01 '20 at 19:19
  • sorry i meant " .home-banner {...} i put that in a separate file called style.css in a folder call css. so when i do href= /css/style.css will it render the style? – OneWithCodess Apr 01 '20 at 19:43
  • `/css/style.css` this means: "go to root and then enter css folder and execute the file style.css " i'm sorry but i can't understand what is the exact question here (maybe it's my English). – A. Meshu Apr 01 '20 at 20:22
  • No,no, maybe it’s how I worded the question but basically in my home.handle bars I made some style and I added those style to a file called style.css. However, the style isn’t rendering . – OneWithCodess Apr 01 '20 at 22:46
  • Check this: https://stackoverflow.com/questions/7591240/what-does-dot-slash-refer-to-in-terms-of-an-html-file-path-location – A. Meshu Apr 02 '20 at 19:09

0 Answers0