Solved

saving a file

Posted on 2003-11-24
2
275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

751 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