By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,190 Members | 1,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,190 IT Pros & Developers. It's quick & easy.

Applying Page Format to Multiple Pages

P: n/a
I am really new at using stylesheets, but am having some success. What
I'm sure is an integral part of using stylesheets, but can't find
anywhere, is making all my pages look the same. Before you jump too
hard to conclusions, let me explain this better. I have the following
in my style.css:

body {
margin:0px;
padding:0px;
font-family:verdana, arial, helvetica, sans-serif;
color:#333;
background: white url(stripesRustBlue.gif);
}

This works fine. But I have a graphic that I want across the top of
the page with some words printed over top plus a Menu. Right now I do
that like this:

CSS

#Header {
margin:00px 0px 00px 0px;
padding:10px 0px 0px 20px;
/* For IE5/Win's benefit height = [correct height] + [top padding] +
[top and bottom border widths] */
height:33px; /* 14px + 17px + 2px = 33px */
border-style:solid;
border-color:black;
border-width:1px 0px; /* top and bottom borders: 1px; left and right
borders: 0px */
line-height:11px;
background-color:#eee;

#e0 {position: absolute;
left: 164;
top: 40;
width: 345;
height: 26;
font: normal bold 18px/24px Arial, serif;
color: #333333;
}

#Menu {
position:absolute;
top:125px;
left:20px;
width:172px;
padding:10px;
background-color:transparent;
line-height:17px;
/* Again, the ugly brilliant hack. */
voice-family: "\"}\"";
voice-family:inherit;
width:150px;
}

HTML

<div id="Header"><img src="caringPeople_rustBlue.gif" width="100%%"
height="100"></div>
<div id="e0">Hill Country Community MHMR Center</div>

<div id="Menu">
<a href="trag.html">TRAG Home</a><br><br />
<a href="atrag-in.html">Request Pre-Authorization</a><br><br />
<a href="trag.html">Review/Approve Requests</a><br />
</div>

This gives me the appearance that I want. My question is, how can this
HTML be handled to put it in one file and include it on each page. I'm
sure it's simple and a no-brainer but I can't find that anywhere in any
of the documents I've read on CSS. Thanks in advance for your help and
please, no 'Read the ## manual' suggestions. I've spent many hours
already trying to find this answer. If you have a specific reference
for me to read that would be great.

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
cc********@hillcountry.org wrote:
I am really new at using stylesheets, but am having some success. What
I'm sure is an integral part of using stylesheets, but can't find
anywhere, is making all my pages look the same. Before you jump too
hard to conclusions, let me explain this better. I have the following
in my style.css:

[snip]
HTML

<div id="Header"><img src="caringPeople_rustBlue.gif" width="100%%"
height="100"></div>
<div id="e0">Hill Country Community MHMR Center</div>

<div id="Menu">
<a href="trag.html">TRAG Home</a><br><br />
<a href="atrag-in.html">Request Pre-Authorization</a><br><br />
<a href="trag.html">Review/Approve Requests</a><br />
</div>

This gives me the appearance that I want. My question is, how can this
HTML be handled to put it in one file and include it on each page. I'm
sure it's simple and a no-brainer but I can't find that anywhere in any
of the documents I've read on CSS. Thanks in advance for your help and
please, no 'Read the ## manual' suggestions. I've spent many hours
already trying to find this answer. If you have a specific reference
for me to read that would be great.

It seems that you spent your hours looking in the wrong places. This is not
a CSS specific problem and CSS offers no solution - it does not touch or
even alter your HTML.

What you need is some server side processing. The simplest solution is SSI
(server side includes), e.g.

<!--#include virtual="/header.inc.html" -->

to include a file containing your header markup. For more details look at
http://httpd.apache.org/docs/howto/ssi.html

More complex solutions are possible with scripting languages like PHP
(www.php.net) or ASP (somewhere on microsoft.com...).

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Jul 21 '05 #2

P: n/a
Thanks for the speedy response. And no wonder I couldn't find it. I
use PHP, so can probably discern how to do this. Thanks again.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.