IngerOlofsson
asked on
linking a CSS to my asp.net page?
I'm building a site in dreamweaver with asp.net c#. Now, my problem is that I can't get the CSS to work with it... can you help me to what I should do?
this is how it looks like now:
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859 -1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>AAA</title>
<link href="/CSS/AAA.css" rel="stylesheet" type="text/css">
</head>
<body>
this is how it looks like now:
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>AAA</title>
<link href="/CSS/AAA.css" rel="stylesheet" type="text/css">
</head>
<body>
ASKER
I now discovered that the thing is... if the stylesheet is in the same folder as my .net page at the server it works!
but.... I would like to have the css in a subfolder and then it does not work at the server
...help...
but.... I would like to have the css in a subfolder and then it does not work at the server
...help...
what if u try like this,
<link rel="stylesheet" type="text/css" href="../CSS/AAA.css">
i assume the folder name & file name are all in caps ?
<link rel="stylesheet" type="text/css" href="../CSS/AAA.css">
i assume the folder name & file name are all in caps ?
ASKER
nope... :(
What does ur directory structure look like ?
ASKER
folderA - is where my index site lies in...
then I have folderA/pics - for pictures
and folderA/CSS - for stylesheet
then I have folderA/pics - for pictures
and folderA/CSS - for stylesheet
<link rel="stylesheet" type="text/css" href="CSS/AAA.css">
just get rid of the / then it should work
just get rid of the / then it should work
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry PeterFearn didnt see ur post, i guess i was still typing when u'd posted..
no worries - I kind of jumped in after you anyway ;)
are u sure taht the file name and the path is proper ?
if u copy ur css file to the page ( instead of the link ) does it work.
If yes Then most probably its cos of the wrongly spelled file name or its not able to get the file path