#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    51
    Rep Power
    4

    Dreamweaver doesn't find CSS


    Hey,

    I use dreamweaver. When I want to link my CSS I use this sort of line:
    Code:
    <link href="/my_map/stylesheet.css" rel="stylesheet" type="text/css">
    Unfortunately, Dreamweaver doesn't seem to recognise this sort of href and I have to write code with no visual reference (while this works flawless when I test it)

    Dreamweaver suggests to me I should use this instead: (which does work in Dreamweaver)
    Code:
    <link href="../my_map/stylesheet.css" rel="stylesheet" type="text/css">
    But I find that this line doesn't always work (I'm currently testing in XAMPP) and I'm stuck with some white pages with no style at all...

    The pages are .php files
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,131
    Rep Power
    4304
    It's probably because paths starting with a "/" will (usually) point to different things when it's on your PC and on a web server. I explained how file paths work here: http://forums.devshed.com/html-progr...rs-537311.html
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo