Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 12th, 2003, 11:53 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Relative Link to External Style Sheet

I have been attempting to link an external stylesheet to my .aspx pages using the following syntax:
<LINK rel="stylesheet" type="text/css" href="Style/Styles.css">

The style sheet (styles.css) in the Style directory that I have created within the project. I believe that I should be able to reference this from anywhere within the project by setting href as follows:
href="/style/Styles.css"

where the first slash indicates that the Style directory is one level below the root directory.

I find that when I do this that my pages don't find the style sheet. I want to be able to reference the stylesheet relative to the root of the web site so that if I move pages around (up or down a directory), the style sheet links will still work.

How do I reference the stylesheet relative to the root of the website??

Any help on this would be greatly appreciated.
  #2 (permalink)  
Old June 18th, 2003, 09:13 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 54
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Try "./Style/style.css"
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 -- Style Sheet problem. Doug Happ BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 4 January 10th, 2008 01:14 PM
cascading style sheet problem nikotromus ASP.NET 2.0 Professional 0 March 24th, 2006 07:49 PM
need xsl style sheet help please!(im a begginer) klipss XSLT 2 July 25th, 2005 02:10 PM
Setting the Style Sheet class jacob ASP.NET 1.0 and 1.1 Basics 4 August 20th, 2003 01:53 AM



All times are GMT -4. The time now is 06:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.