Stylesheet linking question

Discussion in 'HTML' started by Dylan Parry, Nov 15, 2004.

  1. Dylan Parry

    Dylan Parry Guest

    Dylan Parry, Nov 15, 2004
    #1
    1. Advertising

  2. Dylan Parry

    Dylan Parry Guest

    Davmagic .Com wrote:

    > How can I change the href path so that I need to place the stylesheet
    > into only my root directory?


    <link rel="stylesheet" href="/style1.css" type="text/css">
    ^
    --
    Dylan Parry
    http://webpageworkshop.co.uk -- FREE Web tutorials and references
     
    Dylan Parry, Nov 15, 2004
    #2
    1. Advertising

  3. Right now I link to my stylesheet with this code on all my pages:

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

    I have several directories, and using the above code requires that I
    place the stylesheet into each directory...

    How can I change the href path so that I need to place the stylesheet
    into only my root directory?

    Web Design, Magic, Painting, Junking, More
    http://www.davmagic.com/
    Paint A House
    http://www.paintahouse.com/
    NOTE: This emailbox is CLOSED do NOT reply!!!
     
    Davmagic .Com, Nov 15, 2004
    #3
  4. Dylan Parry

    Steve Pugh Guest

    On Mon, 15 Nov 2004 11:56:49 -0500, (Davmagic .Com)
    wrote:

    >Right now I link to my stylesheet with this code on all my pages:
    >
    ><link rel="stylesheet" href="style1.css" type="text/css">
    >
    >I have several directories, and using the above code requires that I
    >place the stylesheet into each directory...
    >
    >How can I change the href path so that I need to place the stylesheet
    >into only my root directory?


    The same way you would for any other link.

    href="../style1.css" to refer to a stylesheet one level higher up,
    etc.
    Or href="/style1.css" to refer to a stylesheet in the site root.

    Steve
     
    Steve Pugh, Nov 15, 2004
    #4

  5. >From: (Steve Pugh)
    >The same way you would for any other
    >link.
    >href="../style1.css" to refer to a stylesheet
    >one level higher up,
    >etc.


    This I am not familiar with... putting "two dots" before the forward
    slash... is this explained anywhere?

    >Or href="/style1.css" to refer to a
    >stylesheet in the site root.


    This is what I figured to be the way to reference the root directory,
    and I have now made all the changes to my pages, to reflect this path...

    Thanks....

    Web Design, Magic, Painting, Junking, More
    http://www.davmagic.com/
    Paint A House
    http://www.paintahouse.com/
    NOTE: This emailbox is CLOSED do NOT reply!!!
     
    Davmagic .Com, Nov 15, 2004
    #5
  6. Davmagic .Com wrote:

    > This I am not familiar with... putting "two dots" before the forward
    > slash... is this explained anywhere?


    It means the same as it does in Windows, and DOS, and UNIX, and most other
    OS out there.

    http://www.iusmentis.com/technology/www/relativeurls/

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Nov 15, 2004
    #6
  7. Davmagic .Com, Nov 15, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski

    Linking to a stylesheet multiple times

    Nathan Sokalski, Sep 14, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    1,165
    JIMCO Software
    Sep 14, 2005
  2. =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=

    Stylesheet referanse i stylesheet

    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jul 3, 2004, in forum: XML
    Replies:
    3
    Views:
    578
    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=
    Jul 4, 2004
  3. Steven An
    Replies:
    1
    Views:
    504
    Martin Honnen
    Nov 23, 2004
  4. David Blickstein
    Replies:
    3
    Views:
    1,039
    David Blickstein
    Aug 2, 2005
  5. David Blickstein
    Replies:
    14
    Views:
    6,342
    Harrie
    Oct 16, 2005
Loading...

Share This Page