Morby-Raybould
Morby-Raybould

Reputation: 200

Can't locate background image

So I have a project I'm working on and Im trying to link URL's in the CSS files, All URL's are pointing towards files that are local and what ever way I type it its just not locating the files or Pictures

@font-face {
    font-family: 'mainbody';
    src: url('~/Content/fonts/Lato-Regular.ttf') format('truetype');

}

//footer
.footer {
    background-image: url("/backgrounds/footer.png");
    width: 1360px;
    height: 907px;
}

File tree

css file

They are the two ways I have tried , and neither of them work

Upvotes: 0

Views: 67

Answers (1)

mikeyq6
mikeyq6

Reputation: 1148

Try:

@font-face {
    font-family: 'mainbody';
    src: url('/Content/fonts/Lato-Regular.ttf') format('truetype');

}

//footer
.footer {
    background-image: url("/Content/backgrounds/footer.png");
    width: 1360px;
    height: 907px;
}

Upvotes: 1

Related Questions