www.webdeveloper.com
Results 1 to 3 of 3

Thread: HTML & CSS not communicating

  1. #1
    Join Date
    Feb 2008
    Posts
    2

    HTML & CSS not communicating

    I will learn from asking this.

    Can anyone tell my why my page stops reading its stylesheet when I move it to a different directory?

    http://www.parpacy.com/psephy0001.html

    I want it to live in a new directory:

    http://www.parpacy.com/psephy/psephy0001.html

    ...but when I try that, it looses the stylesheet.

    Any help is appreciated, and thanks - in advance!


    Also, I intend to make a directory which feeds a different YouTube object on a regular basis through the same template (psephyxxxx.html). I know there must be a less sloppy way to do this with .php than to fill a directory with .html documents (psephyxxx1.html....phephyxxx2.html...). Can anyone point me in the right direction?

  2. #2
    Join Date
    Mar 2006
    Location
    Newcastle NSW Australia
    Posts
    4,033
    Code:
    <link rel="stylesheet" type="text/css" href="css/psephystyle.css" />
    This will only work if the css folder is a child of the folder where the html file is. When the folders are parallel paths, you need to "back up" one folder in the relative link using "../" :
    Code:
    <link rel="stylesheet" type="text/css" href="../css/psephystyle.css">
    Note also that the trailing " /" before the closing tag is only applicable to xhtml, and is an error in html (which the browser will assume the page is as there is no doctype - something that also should be addressed)

  3. #3
    Join Date
    Feb 2008
    Posts
    2
    Thank you - I thought the directory needed to be changed somewhere.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles