Click here to Skip to main content
14,700,123 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hii ,

I am developing webapplication , have css , js , fonts folder structures ..

now the problem here is .. when i create webforms within same project . all css , js gets applied well ..

But now i want to maintain folder structure for authorization and now all the css , js gets out of reach in that folder .. so i have to go for ../ pattern which is very hectic .. and even not sure will that be all working as many js are there and images are coming from there as well ..

Please suggest on this

1 solution

There is no such things as miracle. If you put some files in separate directories, say, the share them in other directories, the file names have to come with some path. Use relative paths, or paths relative to the site's root directories, or mix both ways, and consider the implications, as it is done in case of nearly all kinds of software and informational products.

I never saw anyone complaining about having to take care about this basic thing before, not even anyone calling this trivial kind of decision a "pattern". I would only warn you against one thing: avoid trying to find some "site-global" pattern by using some configuration files, etc. I would only make your solution less portable and maintainable.

Torakami 29-Sep-14 13:40pm
ha ha ha ... lolzzz ... yehh man you are ryt . I was just reying to find the solution here ..

well what do u mena by

Use relative paths, or paths relative to the site's root directories, or mix both ways, and consider the implications

Can you please give me this details more elaborately way that would help me to solve ..

thanks SA
Sergey Alexandrovich Kryukov 29-Sep-14 14:40pm
I have no idea what else could be a problem here.
Something like "../styles/menu.css". What's wrong with that?
Torakami 29-Sep-14 14:56pm
i got confused between ~/ and ../

i thought you are talking about this differnces
Sergey Alexandrovich Kryukov 29-Sep-14 15:01pm
'~' means the root of the site, '..' means parent directory, '.' means "this very directory", like in "./rightHere.css".
So, relative to the root it would be like "~/styles/menu.css". And so on...
Sorry if you expected anything more from the answer, but I see nothing wrong with that.
Torakami 30-Sep-14 1:08am
yes thanks for clearing my doubt .
Sure. Will you accept the answer formally?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900