Solved

saving a file

Posted on 2003-11-24
2
272 Views
Last Modified: 2013-12-03
How can I save a section of my HTML page in a file that I use on every page and include it in my file,
with #include file... or something.

Eg I want to save:
<style type="text/css">

/* for the td style*/
td  {font-family: Arial; color:black;font-size:12px;}
 
 /*for the links*/
a:link    { color: #000000; }    
a:visited { color: #666666; }
a:hover   { color: #FF0000; }
a:active  { color: #FF0000; }

/*for the style of your text boxes*/
.textbox  {font-style:Arial; color:red;font-size:15px;width:300px;}  

/*For the style of the Title pages*/
H1  {font-style:Arial; color:#996600;font-size:15px;}  

/*For the style of the Question names*/
H2  {font-style: Arial; color:#CC0000;font-size:15px;}

/*For the style of the routing instructions*/
H3  {font-style:Arial; color:#99CCFF;font-size:15px;}  
</style>
 and include it in my page
0
Comment
Question by:PieP
  • 2
2 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 30 total points
ID: 9814510
Like this:
<link rel="stylesheet" type="text/css" href="style.css">

You just need to adjust the location depending on where it is in reference to the page.

And style.css contains what you have above, but without the style tags:

/* for the td style*/
td  {font-family: Arial; color:black;font-size:12px;}
 /*for the links*/
a:link    { color: #000000; }    
a:visited { color: #666666; }
a:hover   { color: #FF0000; }
a:active  { color: #FF0000; }
/*for the style of your text boxes*/
.textbox  {font-style:Arial; color:red;font-size:15px;width:300px;}  
/*For the style of the Title pages*/
H1  {font-style:Arial; color:#996600;font-size:15px;}  
/*For the style of the Question names*/
H2  {font-style: Arial; color:#CC0000;font-size:15px;}
/*For the style of the routing instructions*/
H3  {font-style:Arial; color:#99CCFF;font-size:15px;}  
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9817292
Thanks, and good luck with your project!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question