Link a .css on another folder

html link to file in different folder
link local stylesheet
how to link out of a folder in html
how to link css to html
link stylesheet url
css file path
css link stylesheet folder
my stylesheet won t link

I have some questions about how to link things.

Imagine that I have a folder "Website" where my files for that website are stored, and another folder with fonts, and that the font folder has more folders for each font. My html and css file is directly on the website folder. My font-face-css file is on the /font folder.

I want to link my css file to my html file, so I do this: href="stylesheet.css"

I also want to link my font-face-css file to my html file, so what should I put inside href=""?

And I also want to link my fonts, which are in their own folder, which is also inside the font folder which is where the css file is to my font-face-css file, what should I put inside the src:?

 1 Website folder
    1.1 Fonts folder (/fonts)
       1.1.1 Font1 folder (/fonts/font1)
             1.1.1.1 ttf file (/font/font1/font1.ttf)
             1.1.1.2 svg file (/font/font1/font1.svg)
       1.1.2 Font2 folder (/fonts/font2)
             1.1.2.1 ttf file (/font/font1/font2.ttf)
             1.1.2.2 svg file (/font/font1/font2.svg)
    1.2 html file (file.html)
    1.3 css file  (file.css)

Thank you

I dont get it clearly, do you want to link an external css as the structure of files you defined above? If yes then just use the link tag :

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

so basically for files that are under your website folder (folder containing your index) you directly call it. For each successive folder use the "/" for example in your case :

    <link rel="stylesheet" type="text/css" href="Fonts/Font1/file name">
    <link rel="stylesheet" type="text/css" href="Fonts/Font2/file name">

Link a .css on another folder, How to link files in a different folder. Right now all my files are So, you could have a CSS folder for all the CSS files. A JavaScript folder for all  Yes, It is possible to include one CSS file in another and it can be done multiple times. Also, import multiple CSS files in the main HTML file or in the main CSS file. It can be done by using @import keyword. Example 1:

How to link files in a different folder, Where is the HTML page in relation to the CSS files? For example, if you have two folders -- one with your CSS files and another containing  Have all of your CSS files in one folder and all your JavaScript files in another folder. Do the same for your HTML files. To link a CSS file with your HTML file, you have to write the next script

I think what you want to do is

<link rel="stylesheet" type="text/css" href="font/font-face/my-font-face.css">

Css Linking To HTML, I discovered after I did this that my pages in the new folder weren't able to access the CSS Stylesheet. Major bummer. After a quick search on the  To link an HTML page to an external Cascading Style Sheet (CSS), just insert a single line of code into the head of your page that references the name and location of the external CSS file relative to the root level of the server on which the site resides. The line of code for the link must be placed somewhere between the opening and closing <head> tags of every HTML page on your site that you want to be styled with it.

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
.tree-view-com ul li {
  position: relative;
  list-style: none;
}
.tree-view-com .tree-view-child > li{
  padding-bottom: 30px;
}
.tree-view-com .tree-view-child > li:last-of-type{
  padding-bottom: 0px;
}
 
.tree-view-com ul li a .c-icon {
  margin-right: 10px;
  position: relative;
  top: 2px;
}
.tree-view-com ul > li > ul {
  margin-top: 20px;
  position: relative;
}
.tree-view-com > ul > li:before {
  content: "";
  border-left: 1px dashed #ccc;
  position: absolute;
  height: calc(100% - 30px - 5px);
  z-index: 1;
  left: 8px;
  top: 30px;
}
.tree-view-com > ul > li > ul > li:before {
  content: "";
  border-top: 1px dashed #ccc;
  position: absolute;
  width: 25px;
  left: -32px;
  top: 12px;
}
<div class="tree-view-com">
    <ul class="tree-view-parent">
        <li>
            <a href=""><i class="fa fa-folder c-icon c-icon-list" aria-hidden="true"></i> folder</a>
            <ul class="tree-view-child">
                <li>
                    <a href="" class="document-title">
                        <i class="fa fa-folder c-icon" aria-hidden="true"></i>
                        sub folder 1
                    </a>
                </li>
                <li>
                    <a href="" class="document-title">
                        <i class="fa fa-folder c-icon" aria-hidden="true"></i>
                        sub folder 2
                    </a>
                </li>
                <li>
                    <a href="" class="document-title">
                        <i class="fa fa-folder c-icon" aria-hidden="true"></i>
                        sub folder 3
                    </a>
                </li>
            </ul>
        </li>
    </ul>
</div>

How do I link a CSS file in a different folder?, The name of the CSS file, if they're in the same directory. For example you host it on a different site, the href will be the URL link to were the style sheet is. href — specifies the location of the CSS file you want to link to the HTML. If the CSS file is in the same directory as the HTML file, you only need to enter the file name. Otherwise, you need to include the folder name in which you store the CSS file (example: CSS/stylesheet.css). media — specifies the type of media the CSS rules are optimized for

HTML Linking to Different Directories, Check out this detailed guide and learn how to link CSS to HTML. Improve SEO — storing CSS styles in another file makes the HTML file more Otherwise, you need to include the folder name in which you store the CSS  For example, if you have two folders -- one with your CSS files and another containing your HTML file -- and those two folders are both grouped together in the same folder on your computer, then the path to get to the CSS file would be something like "Go UP and OUT of the HTML folder, then INTO the CSS folder and select the CSS file".

How do i link my css stylesheet to my html?, as long as your stylesheet is in the same directory as your html file you need this: <link rel="stylesheet" type="text/css" href="Stylesheet.css" />. but href is short  If your CSS file and HTML file are all in the same sub-folders, you shouldn't need to include all the sub-folders. Links in HTML files are relative (I believe I work mostly on the Backend). So, to link the css file (in the same folder as the HTML file) should only require <

How to Link a Style Sheet (CSS) File to Your HTML File, How to include() all PHP files from a directory ? AngularJS | ng-include Directive · How to include Functions from other files in Node.js ? How to include inline  An external style sheet can be written in any text editor, and must be saved with a .css extension. The external .css file should not contain any HTML tags. Here is how the "mystyle.css" file looks like:

Comments
  • I did this: <link type="text/css" rel="stylesheet" href="fonts/fontface.css"/> fontface.css is inside fonts which is inside website. It did not change my text font, although I assigned them on my .css file. What am I doing wrong?
  • did you apply the font to the text? or did you just import it and do nothing else?
  • Do you meed the www root or the file system root /
  • Code-only answers are generally frowned upon on this site. Could you please edit your answer to include some comments or explanation of your code? Explanations should answer questions like: What does it do? How does it do it? Where does it go? How does it solve OP's problem? See: How to anwser. Thanks!