Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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.
 
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"




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





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