Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to link CSS file

Status
Not open for further replies.

MDA

Technical User
Jan 16, 2001
243
US
Hi,

I have an asp page that uses style sheets... I link to the file using:

<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;UN_STYLE.CSS&quot;>

However, everytime I change the file name or the folder of the css file, the style sheet no longer works?

I found that if I go into an editor such as FrontPage and link the stylesheet, then sometimes it works again. I am 100% that I am pointing to the right location.

Is the location being cached somewhere? What am I missing?

Regards,

MDA
 
Hi,

Try changing the order of the attributes to:

<LINK REL=&quot;stylesheet&quot; HREF=&quot;un_style.css&quot; TYPE=&quot;text/css&quot;>

Make the name and the extension all lower case and try removing the underscore. You should get into the habbit of pathing to the exactly location of the stylesheet in your webspace too.

Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
One of two things... in your code link, you've named your style sheet in upper case: <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;UN_STYLE.CSS&quot;>. It must also be in upper case on your server. Also, Your FTP program may not be preserveing the underscore during upload. Check your FTP configuration options. If none exist, don't use underscores in your file names. There's always a better way...
 
Thanks for the help guys... It was the referencing that I had to change. I thought if the file is in the same folder as the asp page, then it would recognize the css file. I also tried referencing through the virtual directory, which also did not seem to work? I finally got it to work by referencing the directory directly.

i.e. href=&quot;/cweb/main/unstyle.css&quot;

Thanks again for your time and help!

Regards,

MDA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top