Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Incorporating Styles.css in project


Message #1 by "J Donahue" <jdonahue@f...> on Mon, 29 Apr 2002 18:29:24
I know this is an easy question but I've put my CSS info in Styles.CSS 
and I've included it as part of the project.  How do I include it in one 
of my aspx files?  I've having to manually put the styles in the aspx 
page but I'd rather simply refer to the styles.css page.  Thanks!!!!!
Message #2 by Feduke Cntr Charles R <FedukeCR@m...> on Mon, 29 Apr 2002 15:01:48 -0400
	I'm more a keyboard guy and less of a point and click warrior, but
if you put the following line in your <head> section:

<link rel="stylesheet" type="text/css" href="/somedirectory/Styles.CSS" />

then your page will refer to the stylesheet.  There may be a point and click
way to do this.  Also note the "href" starts with "/"; this ensures that
pages that don't have "somedirectory" (i.e. pages that exist in child
directories of the root) start back at the root, then move into
"somedirectory" and request the file "Styles.CSS".

	Even better define a Web UserControl that's a boilerplate for the
top of all your HTML pages so all you have to really do is...

<%@ Register TagPrefix="Fib" TagName="Top" Src="/somedirectory/Top.ascx" %>
<Fib:Top RunAt="server" />

where you'd stick all your <head> information (including the <link> tag,
make your <title> get data from a public property, set the various <meta>
tags, etc etc) and maybe even start your <body> tag with some header
graphics and what not.

-----Original Message-----
From: J Donahue [mailto:jdonahue@f...]
Sent: Monday, April 29, 2002 2:29 PM
To: ASP+
Subject: [aspx] Incorporating Styles.css in project


I know this is an easy question but I've put my CSS info in Styles.CSS 
and I've included it as part of the project.  How do I include it in one 
of my aspx files?  I've having to manually put the styles in the aspx 
page but I'd rather simply refer to the styles.css page.  Thanks!!!!!
Message #3 by "JAMES DONAHUE" <JDONAHUE@F...> on Mon, 29 Apr 2002 13:14:43 -0600
Thanks!!!!!!!!!!!

>>> FedukeCR@m... 04/29 1:01 PM >>>
	I'm more a keyboard guy and less of a point and click warrior,
but
if you put the following line in your <head> section:

<link rel="stylesheet" type="text/css" href="/somedirectory/Styles.CSS"
/>

then your page will refer to the stylesheet.  There may be a point and
click
way to do this.  Also note the "href" starts with "/"; this ensures
that
pages that don't have "somedirectory" (i.e. pages that exist in child
directories of the root) start back at the root, then move into
"somedirectory" and request the file "Styles.CSS".

	Even better define a Web UserControl that's a boilerplate for
the
top of all your HTML pages so all you have to really do is...

<%@ Register TagPrefix="Fib" TagName="Top"
Src="/somedirectory/Top.ascx" %>
<Fib:Top RunAt="server" />

where you'd stick all your <head> information (including the <link>
tag,
make your <title> get data from a public property, set the various
<meta>
tags, etc etc) and maybe even start your <body> tag with some header
graphics and what not.

-----Original Message-----
From: J Donahue [mailto:jdonahue@f...] 
Sent: Monday, April 29, 2002 2:29 PM
To: ASP+
Subject: [aspx] Incorporating Styles.css in project


I know this is an easy question but I've put my CSS info in Styles.CSS

and I've included it as part of the project.  How do I include it in
one 
of my aspx files?  I've having to manually put the styles in the aspx 
page but I'd rather simply refer to the styles.css page.  Thanks!!!!!


  Return to Index