Applying Page Format to Multiple Pages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ccarpenter@hillcountry.org

    Applying Page Format to Multiple Pages

    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(stripesRust Blue.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:absolu te;
    top:125px;
    left:20px;
    width:172px;
    padding:10px;
    background-color:transpare nt;
    line-height:17px;
    /* Again, the ugly brilliant hack. */
    voice-family: "\"}\"";
    voice-family:inherit;
    width:150px;
    }



    HTML

    <div id="Header"><im g src="caringPeop le_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">Reques t 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.

  • Benjamin Niemann

    #2
    Re: Applying Page Format to Multiple Pages

    ccarpenter@hill country.org wrote:
    [color=blue]
    > 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"><im g src="caringPeop le_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">Reques t 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.[/color]
    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


    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/

    Comment

    • ccarpenter@hillcountry.org

      #3
      Re: Applying Page Format to Multiple Pages

      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.

      Comment

      Working...