0

I've just begun to use Aptana Studio 3. I used Aptana 2 in school and it worked fine. However in Studio 3, I can't get my external css to link to my XHTML document. I've tried using absolute path, the commented part of the code. With HTML traditional doc type the css links to the document just fine. Here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title>We Rent Checkers</title>
        <link rel="stylesheet" type="text/css" href="C:\Documents and Settings\Owner\My Documents\Aptana Studio 3 

Workspace\We Rent Checkers\rent_checkers.css" media="screen" charset="UTF-8" /> 
            <!--<style type="text/css" media="screen">
                @import url(rent_rheckers.css);         
            </style> -->
        </head>
Mark
  • 6,762
  • 1
  • 33
  • 50

2 Answers2

2

try to point to your CSS, where it is located relative to your XHTML, if they are in the same folder:

<link rel="stylesheet" type="text/css" href="rent_checkers.css" media="screen" charset="UTF-8" />

never use a file location like c:\

if it is in a folder (like 'css') next to your XHTML:

<link rel="stylesheet" type="text/css" href="css/rent_checkers.css" media="screen" charset="UTF-8" />
Mark
  • 6,762
  • 1
  • 33
  • 50
0

before doing that, go to the folder where your html file is located, then create folder with name "css" in same folder. this is how people link external file with each other. you don't need to give exact path/complete path of file. Relevant path works better, as it works when you upload it on online server, reply for more question and clarification.

Nizam Kazi
  • 1,900
  • 1
  • 20
  • 26