Guys how to choose css in another folder. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 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

13th Feb 2017, 9:39 AM
Osman Hamashool
Osman Hamashool - avatar
4 ответов
+ 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.
13th Feb 2017, 9:53 AM
ChaoticDawg
ChaoticDawg - avatar
+ 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.
13th Feb 2017, 11:50 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
0
thnk u so much @chaotic
13th Feb 2017, 11:46 AM
Osman Hamashool
Osman Hamashool - avatar
0
Okay mr.Devender thank you a lot
13th Feb 2017, 11:53 AM
Osman Hamashool
Osman Hamashool - avatar