Trium918 Posted June 11, 2007 Share Posted June 11, 2007 index.php and a folder named style are in the same directory. Style contains a CSS file called test.css. I am trying to access test.css from index.php by using ../ Which would be the equivalent to? @import url(style/superiun.css ); @import url(./superiun.css ); or @import url(../superiun.css ); Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/ Share on other sites More sharing options...
AndyB Posted June 11, 2007 Share Posted June 11, 2007 Imagine you had another folder named wombat in that same directory. In your two examples, how would ./ or ../ guess whether to look in the folder named style or the folder named wombat? Does that suggest that the folder name is an intrinsic requirement of the path? Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272722 Share on other sites More sharing options...
Trium918 Posted June 11, 2007 Author Share Posted June 11, 2007 Imagine you had another folder named wombat in that same directory. In your two examples, how would ./ or ../ guess whether to look in the folder named style or the folder named wombat? Does that suggest that the folder name is an intrinsic requirement of the path? I don't understand! All I am trying to do is access the the content inside of the style folder. Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272757 Share on other sites More sharing options...
AndyB Posted June 12, 2007 Share Posted June 12, 2007 then the link/relative link must include the (right) folder name Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272765 Share on other sites More sharing options...
Trium918 Posted June 12, 2007 Author Share Posted June 12, 2007 then the link/relative link must include the (right) folder name So I cannot use ../ or ./? When can I used them? Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272820 Share on other sites More sharing options...
AndyB Posted June 12, 2007 Share Posted June 12, 2007 ../ is up a level, i.e. a superior folder Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272854 Share on other sites More sharing options...
Trium918 Posted June 12, 2007 Author Share Posted June 12, 2007 ../ is up a level, i.e. a superior folder This doesn't work either. @import url(style/superiun.css ); Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272856 Share on other sites More sharing options...
AndyB Posted June 12, 2007 Share Posted June 12, 2007 @import url(/style/superiun.css); Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272857 Share on other sites More sharing options...
Trium918 Posted June 12, 2007 Author Share Posted June 12, 2007 @import url(/style/superiun.css); Nothing! http://www.superiun.com Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272861 Share on other sites More sharing options...
Trium918 Posted June 12, 2007 Author Share Posted June 12, 2007 Both work! Style should have been style. Big differences. @import url(./superiun.css ); and @import url(../superiun.css ); Quote Link to comment https://forums.phpfreaks.com/topic/55119-solved-i-guess-directory-structure/#findComment-272875 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.