Why style.css in deep subdirectory folder doesn't work

Discussion in 'HTML & Website Design' started by ketting00, Mar 8, 2011.

  1. #1
    Hi, I've tried building a web site with the layout are put in a deep sub-directory, says; it should look like =>rootdirectory/userarea/template/template1/header.php

    I tried to link the utilize the style.css file with simple tag like <link href="styles.css" rel="stylesheet" type="text/css"> but it doesn't work.

    It works good when these files are in root directory, says, header.php and other files in the first folder.

    How can I overcome this.

    Sorry for my Bad English and you understand what I meant.

    Thanks
    Ket
     
    ketting00, Mar 8, 2011 IP
  2. Divisive Cottonwood

    Divisive Cottonwood Peon

    Messages:
    1,674
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It will be the case that your path is wrong.

    href="styles.css" -> you need to make sure the directory(s) is specified, such as href="directory/styles.css"
     
    Divisive Cottonwood, Mar 8, 2011 IP
  3. ketting00

    ketting00 Well-Known Member

    Messages:
    782
    Likes Received:
    28
    Best Answers:
    3
    Trophy Points:
    128
    #3
    Thanks! It works!

    I've tried to hit my head on the wall about this.
     
    ketting00, Mar 8, 2011 IP
  4. Gallone64

    Gallone64 Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If it happens again, do this


    href="http://www.yourwebsite.com/style.css"

    :)
     
    Gallone64, Mar 8, 2011 IP