Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: href problem!!

  1. #1
    New to the CF scene
    Join Date
    Oct 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    href problem!!

    I have a problem i'm hoping someone can help me with, I am using DreamWeaver 8.

    I have a template saved from which I was creating pages from, which used to work fine But now everytime I create a new page from the template the css is not applying when previewed.

    The code from the template is shown below - which previews fine with the CSS style sheet applied.

    <link rel="stylesheet" href="../2col_leftNav.css" type="text/css" />
    <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
    <style type="text/css">
    <!--

    Now when i create a page from this template the code shows this

    <link rel="stylesheet" href="/2col_leftNav.css" type="text/css" />


    for some reason the href now has a "/" in which is stopping the css being applied. (the pages created from the template which worked fine before i had this problem do not have the "/" after href!

    i.e

    <link rel="stylesheet" href="2col_leftNav.css" type="text/css" /> <---- the css style sheet works fine with this code


    Can anyone tell me how i can stop href from adding this "/" everytime i create a new page from the template? remember that the code on the page created from the template is locked!

    Sorry if i sound a bit simple, im very new to coding.

    Thanks
    Last edited by frankiefish; 10-03-2007 at 11:29 PM.

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    You didn't move the template out of its subdirectory, did you?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by nikkiH View Post
    You didn't move the template out of its subdirectory, did you?
    http://codepunk.hardwar.org.uk/bhtmlx12.htm

    This may explain a thing or two.

    The "/" is used sometimes to move a level in addressing.


    Frank
    Last edited by effpeetee; 10-04-2007 at 04:43 PM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •