Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't link css files to html is not working on eclipse

I downloaded some css template from the web, copied the folders containing the css files and pasted them in my project, i used their html code as well in order to test the page on the server. It just doesnt work and i went through all the steps on the internet to link css to html.

The css folder is inside WEB-INF, the jsp pages are inside web content, i can't yet post an image on the site so i'll hope you can picture the structure.

<link rel="stylesheet" href="/WEB-INF/css/animate.css" type = "text/css"/>

this is the link syntax i'm using copied from stackoverflow.com and even if i include the project name in the path, it still doesn't work.

Is the folder structures wrong ? or something with the link syntax ?

any help appreciated

like image 569
Ralph Kesrouani Avatar asked Oct 13 '25 02:10

Ralph Kesrouani


2 Answers

change

 href="/WEB-INF/css/animate.css" 

to

 href="/css/animate.css" 

You don't need to write that... css, pages and images are usually put into the webcontent folder (as per practice).

like image 163
Danyal Sandeelo Avatar answered Oct 14 '25 16:10

Danyal Sandeelo


I Think you have just to be simple and link your css like this:

This work in HTML, PHP

<link rel="stylesheet" type="text/css" href="css/animate.css" />

This is for ASP.NET

<link rel="stylesheet" type="text/css" runat="server" href="css/animate.css" />

I Hope it help!

like image 32
McElie Avatar answered Oct 14 '25 16:10

McElie