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

    Join Date
    Jan 2011
    Rep Power

    Dreamweaver doesn't find CSS


    I use dreamweaver. When I want to link my CSS I use this sort of line:
    <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)
    <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
    USA (verifiably)
    Rep Power
    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.

    Learn CSS. | PHP includes | HTML Validator | CSS validator

    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