+ 3
Guys how to choose css in another folder.
i mean for example my project is a (C:), I want to use css in the (F:) using <link> element
4 Respostas
+ 3
<link href="/Content/discussion.css" rel="stylesheet"/>
<link href="/Content/material.css" rel="stylesheet"/>
Here's a couple right from this webpage here on sololearn.
You can also use a URL to link to a css file on a server somewhere.
Or use a relative path where "./" is the same folder your html, php etc file is in, or "../" goes up one to the parent folder. For instance "../../html/css/style.css" <-- goes up 2 folders then into the html/css folder.
+ 2
Dear Osman, make sure that all files and resources in your projects must be at relative location to the root of the project. It will make things lot easier. Your project folder should look like as follows
c:\project-html
|-css
|-site.css
|-images
|-js
|index.htm
Now CSS file can be link as:
<link href="css/site.css" rel="stylesheet"/>
This approach will simplify web development and make your project portable.
0
thnk u so much @chaotic
0
Okay mr.Devender thank you a lot