SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2010
    0 Post(s)
    0 Thread(s)

    Directories and stylesheet

    My website has over 130 pages and when I originally created it in FrontPage everything linked with my images file without issue. Now I'm redesigning it with CSS and have created a Directory, consisting of 22 folders. I have my stylesheet in the parent folder but i'm having problems with my pages linking to it ouside the individual folders. I'm using:

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

    Do I need to make the link href more specific to its location? I'm attaching a copy of my parent folder. Any help would be greatly appreciated.
    Attached Images Attached Images

  2. #2
    SitePoint Addict Zarin Denatrose's Avatar
    Join Date
    Jan 2009
    Surrey BC, Canada
    0 Post(s)
    0 Thread(s)
    The href in the link tag can be relative to its own position, or absolute. In this case, I would recommend using a relative path.
    This should suit your purpose:
    <link href="../style.css" rel="stylesheet" type="text/css" />


Posting Permissions

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