Solved

saving a file

Posted on 2003-11-24
2
269 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

861 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now