svendsek Posted May 25, 2009 Share Posted May 25, 2009 Hi! I have a bit of an annoying hassle with linking to my CSS, and i really don't quite know how to explain the problem, but I'll do my very best: So, i have this css that i use in my site, that has been working perfectly for the last few months, up until now. I've started developing the admin-area of my site, I've placed the portion that I'm having trouble with in a folder called "innlegg" or "posts" in english. (the folder is located one level above root) The top part of my page is the same in every page (header, navbar and so on) So I have put all theese bits of code in a file that i include in the top of the document. the include file contains the linking to the css, wich looks like this: <link href="css/stil2.css" rel="stylesheet" type="text/css" /> I use dreamveawer cs4 for developing, and in design view, the code above, is the only thing that seems to be giving any results. now, I know that you can't trust DW's design view, and that using DW in itself probably is a sin, according to the codecs of theee forums, but anyhow, when I open the page that I've been working on (only the posts part) displays without any CSS applied to it... What do you guys think is the problem? is there an error in the linking to the css, or is it because of the including any answer would be widely apriciated. Excuse my faulty English, I am but a meere Norwegian Quote Link to comment Share on other sites More sharing options...
mimintweak Posted May 26, 2009 Share Posted May 26, 2009 I am no expert but maybe the file cannot be found because in the snippet you say<link href="css/stil2.css" rel="stylesheet" type="text/css" />,and you say you have moved that file to a folder called "innlegg:" So try adding <link href="innlegg/css/stil2.css" rel="stylesheet" type="text/css" /> Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted May 26, 2009 Share Posted May 26, 2009 Restart your computer/dreamweaver. i think the stylesheet was in dreamweavers cache/memory (incorrectly). I recommend getting firebug for firefox. Its a simple plug-in which will lets you keep track of css styles within each element. You could also see which stylesheets are connected to the html page. Quote Link to comment Share on other sites More sharing options...
svendsek Posted May 26, 2009 Author Share Posted May 26, 2009 Thank you very much for the tips as i continue developing, an other question rose in my mind: when you link to a file situatet one level higher than the file you are working in, you do this with ../filename.php or is that wrong? I know the question is kinda off topic, but i thought it would be okay for just a small follow-up question in the future i will start new topics in the right forums Quote Link to comment Share on other sites More sharing options...
Axeia Posted May 26, 2009 Share Posted May 26, 2009 Yes for one level up use ../, nothing wrong with it. you can use / at the start to begin at the root as well. (although for local testing this is usually a pain as whatever you're working on will be in a subdirectory instead of the root. Quote Link to comment 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.