How to upload a css file from local path?

Viewed 190

I created some lines of CSS for my site and I want to upload it in the stylesheet. The file path's link is:

file:///storage/emulated/0/Download/test.css

So, I used this code:

<link rel='stylesheet' href='file:///storage/emulated/0/Download/test.css'></link>

You would have already guessed that this wouldn't work. Now please tell me how to upload this file to my source code.

5 Answers

You can't if you are looking to make this on a global site. The best option is to put the css text in your style thing.

you dont have to put the full path you just have to put

<link rel='stylesheet' href='test.css' />

if your index.html and test.css in the same file .

You can try this path ( Assuming html and css are in the same place):

<style type="text/css">
    @import "example.css";
</style>

You have to simply put the solution path where your file does exists

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

be sure you have placed '/' at start because when you route to another page files will not load

/styles/main.css then add to template with <link href="/styles/main.css" rel="stylesheet" />

@import url('reset.css');
@import url('fonts.css');
@import url('forms.css');
@import url('layout.css');
Related