 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
sticks464

Joined: 31 Dec 2006 Posts: 2250
|
Posted: Tue Nov 27, 2007 6:16 am SSI Help |
|
|
|
For those that want to use SSI (server Side Includes). It means just what it says "Server Side" so it cannot be view locally on the testing machine unless there is a server installed.
Read First:
http://www.htmlcodetutorial.com/help/ftopic3918.html
Example of a normal site page (index.html) of which there are 10 pages:
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Page title</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<!-- Top Menu -->
<div id="menu">
<ul id = "navlist">
<li id = "active"><span>HOME</span></li>
<li><a href = "inventory.html">ABOUT US</a></li>
<li><a href = "contact.html">CONTACT US</a></li>
</ul>
</div>
<!-- Header -->
<div id="header"><p class="top">PC Users<br />Organization</p></div>
<!-- Main content -->
<div id="inner">
<!-- Side Menu -->
<div id="sidebar">
<p class="first">Site <span>N</span>avigation</p>
<ul id="navigation">
<li><a href="#">PORTFOLIO</a></li>
<li><a href="#">CALENDAR</a></li>
<li><a href="#">MEMBERS</a></li>
</ul>
<img src="images/left2.gif"alt="#" class="design">
<img class="comp" src="images/IntelliStation_E_Pro_with_Pentium_III.gif" alt="IntelliStation_E_Pro_with_Pentium_III">
</div>
<div id="content">
<p class="line">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus. Pellentesque id arcu non sem placerat iaculis. Curabitur posuere, pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.</p>
</div>
<div id="footer">
<p><a href="#">About Us</a> || <a href="#">Contact Us</a></p>
<p class="footbtm">© 2007 PC Users</p>
</div>
</div>
</div>
</body>
</html> |
Open a new file in your text editor (notepad is a normal one). Copy and paste the code for the left menu into this page.
| Code: |
<ul id="navigation">
<li><a href="#">PORTFOLIO</a></li>
<li><a href="#">CALENDAR</a></li>
<li><a href="#">MEMBERS</a></li>
</ul>
|
Save this page as menu.html (TYPE=text, ENCODING=ANSI) into the site root directory.
Going back to the main page, delete the code you just copied and insert the include statement in it's place
| Code: |
<div id="sidebar">
<p class="first">Site <span>N</span>avigation</p>
<!--#include file="menu.html" -->
<img src="images/left2.gif"alt="#" class="design">
|
Save this page as index.shtml.
Repeat the above step for each additional page that the menu is used on.
This can be done for any element that is repetative on many page reducing the edit time by editing one page instead of many.
**Styling is in external style sheet and will work as if the includes does not exist and the content is still on the original page** |
|
PayneLess Designs

Joined: 28 Feb 2007 Posts: 3506 Location: Biloxi, MS
|
Posted: Sun Dec 23, 2007 3:35 pm |
|
|
|
This code:
| Code: |
| <!--#include file="menu.html" --> |
only works for those pages that are in the same directory as the file being called. To call the same file on pages outside the root directory (pages in another folder) use:
| Code: |
| <!--#include virtual="/menu.html" --> |
Changes also need to be made to the .htaccess file to use SSI, plus your hosting service has to allow use of SSI on the server. .htaccess file:
| Code: |
AddType text/html .shtml
AddHandler server-parsed .shtml |
All pages for site should be renamed from*.html to *shtml except those that are the include files.
Ron
Last edited by PayneLess Designs on Mon Mar 31, 2008 7:12 pm; edited 1 time in total |
|
yangyang
Joined: 05 Oct 2006 Posts: 44
|
Posted: Mon Mar 31, 2008 5:34 pm |
|
|
|
That is really something, man! Great writing up, sticks and PayneLess!
I have something to contribute too, look this:
| Quote: |
Changes also need to be made to the .htaccess file to use SSI, plus your hosting service has to allow use of SSI on the server. .htaccess file:
Code:
AddType text/html .shtml
AddHandler server-parsed .shtml |
You might also need to add
to httpd.conf or .htaccess, or Apache won't parse for SSI.
| Code: |
<!--#include virtual="/menu.html" -->
|
is always preferred over
| Code: |
<!--#include file="menu.html" -->
|
and the reason is what PayneLess has made clear.
To get 80% out of SSI, you only need one directive, that is <!--#include virtual=" ... " -->. It's the essence I believe. And to get the rest 20%, you might also want to know about these handy ones (incomplete, just examples I think that will amuse you):
Get file size:
| Code: |
| <!--#fsize file="script.pl"--> |
Get last modified date:
| Code: |
| <!--#flastmod virtual="index.html"--> |
Get visitor IP address:
| Code: |
| <!--#echo var="REMOTE_ADDR" --> |
Get today's date:
| Code: |
| <!--#echo var="DATE_LOCAL" --> |
Setting and getting a variable:
| Code: |
<!--#set var="name" value="Rich" -->
<!--#echo var="name" --> |
You can even do some concatenation:
| Code: |
<!--#set var="firstname" value="Rich" -->
<!--#set var="lastname" value="Mond" -->
<!--#set var="name" value="${firstname} ${lastname}" --> |
You get the idea. =) |
|
sticks464

Joined: 31 Dec 2006 Posts: 2250
|
Posted: Mon Apr 28, 2008 2:01 pm |
|
|
|
| Great post yangyang, however a good hosting service will have htaccess and Apache set up for using includes. |
|
cmrsf1
Joined: 01 Nov 2009 Posts: 5
|
Posted: Sun Nov 01, 2009 2:47 pm I guess I am missing something very fundamental about .shtml |
|
|
|
Hi,
I have been going thru all kinds of online tutorials about creating a .shtml file but still am not getting it to work. Here is the site so you can see what I am trying to do http://www.progressivelifetherapy.com/bio.html and here is the test file and what it is showing up as: http://www.progressivelifetherapy.com/test.shtml
Here is what my understanding is:
I should be able to go into the bio.html page and use it as a template by breaking down the various parts of the page into separate .html files. These files are to be uploaded to my root directory. I then create a new file (for testing purposes, I've created test.shtml)
I've gone into my bio.html page that I want to use as the template throughout my site. The logo is an image file that I have in a row of a table: In the original, it looks like this:<body> <body bgcolor="#000000">
<table width="756" border="0" align="center" cellpadding="4" bordercolor="#000000">
<tr>
<td colspan="2"><img src="/PLT-2.gif" width="785" height="50"></td>
</tr>
I have copied and pasted that code into a new file and called it top.html
Using this same logic, I then went to the menu on the left side, which is in a column of its own, copied and pasted the text into a new file and called it contents.htm. I then copied the code for the middle column and pasted it into a new file called body.htm and created a final file called footer.htm
I have then taken this list of files and pasted them into my test.shtml file. It looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<style type="text/css">
<!--
body {
background-color: #930000;
}
.style1 {color: #CCCCCC}
.style5 {color: #FFFFFF}
.style7 {font-size: xx-small}
.style8 {font-size: 16px}
.style12 {font-size: x-small}
.style13 {
font-family: "Arial Rounded MT Bold";
color: #FFFFFF;
}
a:link {
color: #00CCFF;
}
a:visited {
color: #00FFFF;
}
a:hover {
color: #0099FF;
}
a:active {
color: #3300FF;
}
.style14 {
font-family: "Arial Rounded MT Bold";
font-style: italic;
}
.style19 {font-size: 14px}
-->
</style>
<title></title>
</head>
<body>
<!--#include virtual="top.html"-->
<!--#include virtual="contents.htm"-->
<!--#include virtual="body.htm"-->
<!--#include virtual="footer.htm"-->
</body>
</html>
When viewing the test file in a browser - http://www.progressivelifetherapy.com/test.shtml, all of the parts show up, but not in the order that they are supposed to. How do I go about accomplishing the original order that is shown in bio.html ?
I know that this is asking a lot, but can anyone set me straight on this? I have spent a lot of time on trial and error prior to coming here...
Thanks!
Casey |
|
sticks464

Joined: 31 Dec 2006 Posts: 2250
|
Posted: Sun Nov 01, 2009 7:22 pm |
|
|
|
Looking at your code the biggest mistake your making is setting up your included pages as normal pages. Included pages only contain the parts of the original file that are moved to separate files for ease of editing/updating. Include pages should be the content that will get updated on a regular basis but is not confined to just that content.
Below is how each one of your included pages should look. It is good practice to use the same extension on all files and not mix them (htm or html).
Example:
top.html should have only the following and nothing else
| Code: |
<table width="756" border="0" align="left" cellpadding="4" bordercolor="#000000">
<tr>
<td colspan="2"><img src="/PLT-2.gif" width="785" height="50"></td>
</tr> |
contents.html
| Code: |
<tr>
<td width="117" align="left" valign="top" bgcolor="#990000"><p class="style5"><span class="style8">
<tr>
<th scope="col"><div align="left"><a href="/bio.html"><img src="/buttons/home.jpg" width="110" height="20" border="0"></a>
</div>
<p align="left"></p>
<p align="left" class="style9"><a href="/acu-ki.html"><img src="/buttons/acuki.jpg" alt="Acu Ki" width="110" height="20" border="0"></a></p>
<p align="left" class="style9"><a href="/acupressure.html"><img src="/buttons/acupressure.jpg" alt="Acupressure" width="110" height="20" border="0"></a></p>
<p align="left" class="style9"><a href="/channeled_readings.html"><img src="/buttons/channeled_readings.jpg" alt="Channeled Readings" width="110" height="40" border="0"></a></p>
<p align="left" class="style9"><a href="/meditation_mantra.html"><img src="/buttons/meditation_intensive_mantra_initiation.jpg" alt="Meditation Intensive and Mantra Initiation" width="110" height="60" border="0"></a></p>
<p align="left" class="style9 style13">Travels</p>
<p align="left" class="style9"><a href="/Slides/1.html"><img src="/buttons/india.jpg" alt="India Slide Show" width="110" height="20" border="0"></a></p>
<p align="left" class="style9"><a href="/beijing.html"><img src="/buttons/beijing.jpg" alt="Beijing, China" width="130" height="20" border="0"></a></p>
<p align="left" class="style9"><a href="/psychic_art.html"><img src="/buttons/psychic_art.jpg" alt="Psychic Art" width="110" height="20" border="0"></a></p>
<hr align="left">
<p align="left" class="style13 style1">Art Shows </p>
<p align="left" class="style13 style1"><em>New ! <span class="style19">November 6, 09</span></em></p>
<p align="left" class="style9 style13"><a href="nov_06_09_show/shifting_colors_of_light.htm"><img src="/buttons/shiftingcolorsoflight.jpg" width="124" height="40" border="0"></a></p>
<p align="left" class="style9 style13"><a href="/711artopening.html"><img src="/buttons/visionsofsoul.jpg" alt="Visions of Soul" width="140" height="20" border="0"></a></p>
<p align="left" class="style9 style13"><a href="/peter_jones_gallery.html"><img src="/buttons/peter_jones_gallery.jpg" alt="Peter Jones Gallery, Chicago" width="124" height="40" border="0"></a></p>
<hr align="left">
<p align="left" class="style9"><a href="/Acrylics/slideshow/my_slide_show/Acrylics_on_Canvas/html/viewer.htm"><img src="/buttons/acrylics_on_canvas.jpg" width="110" height="40" border="0"></a></p>
<p align="left" class="style9"><a href="/reiki.html"><img src="/buttons/reiki.jpg" alt="Reiki" width="110" height="20" border="0"></a></p>
<p align="left" class="style9"><a href="/tarot.html"><img src="/buttons/tarot.jpg" alt="Tarot" width="110" height="20" border="0"></a></p>
<p align="left" class="style9"><a href="/transformational_hypnotherapy.html"><img src="/buttons/transformation_hypnotherapy.jpg" alt="Transformation Hypnotherapy" width="110" height="40" border="0"></a></p>
<p class="style5 style1"><strong>Subsribe to our Newsletter for Periodic updates </strong></p>
<form method="POST"
action="http://www.progressivelifetherapy.com/cgi-bin/autoresponder/ar.cgi">
<input
type="hidden" name="mode" value="optin">
<input type="hidden" name="ar"
value="neela">
<div align="left">
<center>
<table border="1" cellspacing="0"
bgcolor="#990000" cellpadding="2">
<tr>
<td align="right" class="style5 style24 style1"><font face="Tahoma"
size="2">Name:</font></td>
<td><font face="Tahoma" size="2">
<input
type="text" name="user" size="20">
</font></td>
</tr>
<tr>
<td
align="right" class="style5 style24 style1"><font face="Tahoma" size="2">Email:</font></td>
<td><font
face="Tahoma" size="2">
<input type="text" name="email"
size="20">
</font></td>
</tr>
<tr>
<td align="center" colspan="2"><font face="Tahoma" size="2">
<input type="submit"
value="Subscribe" name="B1">
</font></td>
</tr>
</table>
</left>
</div>
</form>
<p align="left"><a href="mailto:neelaatprogressivelifetherapy.com"><img src="/buttons/contact.jpg" alt="Contact" width="110" height="20" border="0"></a></p></th>
</tr>
</table> |
body.html
| Code: |
<td width="629" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="4" bgcolor="#FFFFFF">
<tr valign="top">
<td width="76%" height="50" bgcolor="#FFFFFF"><p>
<strong>
</strong><div align="center">
<p align="left"><strong>Neela Bindu, Master Alternative Therapist, </strong>has been bringing transformational healing and balance into people's lives for over 30 years. She has studied with masters in the USA, Europe, <a href="/Slides/1.html">India</a>, and the Philippines. While living in the Philippines, she worked side by side with top psychic surgeons, receiving transmission of the healing energies. After earning her certification in healing arts, she lived and travelled extensively through India, spending much time in the Himalayas, at ashrams, with saints, yogis, and in meditation and retreat. She is versatile and compassionate, a Master therapeutic practitioner and teacher with highly developed skills and knowledge. She can guide and help you, physically, emotionally, mentally, and spiritually. </p>
<div align="left">
<p>In 1997, she created and developed the healing art of Acu-Ki <span class="style12">SM </span> . Later, she developed her own hypnotherapy technique called Transformational Hypnotherapy <span class="style12">SM </span>. She received her certification in Acupressure in California from the Jin Shin Do Foundation and is also certified in traditional Acupressure. She received her certification in Hypnotherapy from the Alchemical Hypnotherapy Institute in Santa Fe, New Mexico. She received training and Master certification in all systems of Reiki Healing through the William Rand Foundation, which teaches the original Japanese Reiki system. She received certification in Body Alignment Therapy and Breath Technique from the American Yoga Foundation, Bovina, New York. </p>
<p>Through most of her life, Neela has been using the medium of art to create and express, in 1999, she developed a technique called Psychic Art <span class="style7">SM</span>.. She is a natural born psychic and healer who has deepened her abilities through her direct experience of the Divine. </p>
</div>
<p align="justify"> </p>
<hr>
<strong><br>
</strong><p></p>
<p></p>
</div>
<strong></strong></td>
<td width="24%"><div align="center"><img src="/NeelasFaceweb.jpg" width="125" height="151" vspace="150"></div></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><img src="/DynamicHealing2.gif" alt="Dynamic Healing and Awareness" width="645" height="50"></p></td> |
footer.html
| Code: |
<table width="800" border="0" bgcolor="#990000">
<tr>
<th scope="col"><div align="right">
<p class="style1">Copyright 2008-2009<br>
All Rights Reserved<br>
Porgressive Life Therapy, Inc <br>
</div></th>
</tr>
</table> |
test.shtml
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<style type="text/css">
<!--
body {
background-color: #930000;
}
.style1 {color: #CCCCCC}
.style5 {color: #FFFFFF}
.style7 {font-size: xx-small}
.style8 {font-size: 16px}
.style12 {font-size: x-small}
.style13 {
font-family: "Arial Rounded MT Bold";
color: #FFFFFF;
}
a:link {
color: #00CCFF;
}
a:visited {
color: #00FFFF;
}
a:hover {
color: #0099FF;
}
a:active {
color: #3300FF;
}
.style14 {
font-family: "Arial Rounded MT Bold";
font-style: italic;
}
.style19 {font-size: 14px}
-->
</style>
</head>
<body>
<!--#include virtual="top.html"-->
<!--#include virtual="contents.html"-->
<!--#include virtual="body.html"-->
<!--#include virtual="footer.html"-->
</body>
</html> |
You can also use the following to include files
| Code: |
<!--#include file="top.html" -->
<!--#include file="contents.html" -->
<!--#include file="body.html" -->
<!--#include file="footer.html" --> |
|
|
cmrsf1
Joined: 01 Nov 2009 Posts: 5
|
Posted: Sun Nov 01, 2009 10:40 pm page still not formatting correctly in test.shtml |
|
|
|
Hi,
I really do appreciate you taking the time to look at this and the clarifications you made in regard to elimininating everything from the html page except for the syntax directly related to each section of the page. I went in and cleaned up everything as you directed but the page still wasn't loading correctly. http://www.progressivelifetherapy.com/test.shtml I then combined three columns from the page and made them into contents.html This included the table of contents on the left which will require periodic updating, the body of text that I will want to be able to change for each page(middle of page) and the bottom row that shows copyright info. I've done this trial by creating a new test file: http://www.progressivelifetherapy.com/test2.shtml
I guess my question is, how do I exercise greater control over the formatting so that the tables will appear as originally laid out? ie: http://www.progressivelifetherapy.com/bio.html
Again,
Thanks!
Casey |
|
cmrsf1
Joined: 01 Nov 2009 Posts: 5
|
Posted: Mon Nov 02, 2009 11:41 am Scratch that last question... |
|
|
|
Hi,
I guess I'm struggling with trying to understand the overall use of the .shtml . It seems to me that the http://www.progressivelifetherapy.com/test3.shtml is correct. I have changed all the files in the menu to .shtml and made the links to go to the same. However, when I bring this up, the files in the contents menu all show up to have the .shtml suffix but when I click on one of those items, it brings up the new menu that was originally part of that file without the .shtml suffix. They are all .html I undertook this to make it so that when updating the site, I wouldn't have to go to each file to change each and every content menu and if I want to change the logo at the top of the page (top.html), add a menu item in (contents3.html) and change the copyright or add to the footer.html without having to go thru the whole site, one file at a time. I know it's supposed to be a simple concept but just understanding the fundamentals has been a bit tricky. Have I stated the above correctly? Or what simple concept here am I missing?
Thanks! |
|
sticks464

Joined: 31 Dec 2006 Posts: 2250
|
Posted: Mon Nov 02, 2009 11:49 am |
|
|
|
It makes no difference what the extension of the included files are, as long as they are in the right order and markup flows as if they were actually on the page.
I am doing you a mock-up of a css layout where it will be easier to understand and edit/update. |
|
cmrsf1
Joined: 01 Nov 2009 Posts: 5
|
Posted: Mon Nov 02, 2009 2:44 pm |
|
|
|
| Wow...! Thank you! I am studying up more about the whole css and ssi issues in this forum. I guess this is why I always like frames in a website because they were fairly easy to update. I'm looking forward to having this lesson down! |
|
sticks464

Joined: 31 Dec 2006 Posts: 2250
|
Posted: Mon Nov 02, 2009 4:45 pm |
|
|
|
To keep files separate we will create some folders to contain the files and images. These folders will be inside the root folder or main folder. The main folder replicates the folder all files are uploaded into on the server, normally called public_html, htdocs or some other name. The root folder on your computer is only to contain all files and folders pretaining to the site being designed and is not uploaded.
Folders to create...
css - holds the css files
images - holds all images
inc - holds all files to be included on pages
This will be the master css (save it as master.css)file and goes in the css folder. This stylesheet will import two more stylesheets which will make editing of styles simple. The reset stylesheet will reset all browser defaults to zero, the main_menu stylesheet will style the menu in the left sidebar.
| Code: |
@import url("css-reset.css");
@import url("main_menu.css");
/* Global Styles */
body {
font-family: Arial, Helvetica, sans-serif;
background: #930000;
font-size: 1em;
line-height:1.5;
}
h1, h2, h3, h4, h5, h6 {font-weight:bold;}
h2 {font-size:1.2em;}
strong {font-weight:bold;}
#mast a:link , .wrapper a:link {
color: #00CCFF;
font-family: "Arial Rounded MT Bold";
font-style: italic;
}
#mast a:link , .wrapper a:visited {color: #00FFFF;}
#mast a:link , .wrapper a:hover {color: #0099FF;}
#mast a:link , .wrapper a:active {color: #3300FF;}
#sidebar a {
font-weight:bold;
color:#fff;
}
#sidebar a:hover {
color:#333;
}
#container {
width:850px; /* any width including 100% will work */
color: inherit;
margin:1em auto 0; /* remove if 100% width */
background:#FFF;
position:relative;
}
#header {
width: 100%;
height: 50px;
background: #990000 url(images/PLT-2.gif) no-repeat top center;
}
#mast {
background: #990000;
text-align:center;
font-family: "Arial Rounded MT Bold";
font-style: italic;
line-height:3em;
}
#content {/* use for left sidebar, menu etc. */
color: #000;
float: right;
margin: 0 0 0 -200px; /* adjust margin if borders added */
width: 100%;
overflow:hidden;
}
#content .wrapper {
background: #FFF;
margin: 0 0 0 200px;
overflow: hidden;
padding: .7em; /* optional, feel free to remove */
position:relative;
}
#sidebar {
background: #990000;
float: left;
width: 200px;
border-top:2px solid #930000;
}
#footer {
clear: both;
text-align: center;
background:#930000;
}
.clearer {
clear:both;
height:1px;
}
/* content styles */
#header h1 {
padding: 0 0 0 5px;
}
#footer p {
padding: 10px 0;
font-size: 85%;
font-weight: bold;
}
#content p {
text-align:justify;
margin-bottom:15px;
}
.image-container{
width:100%;
}
.image-container img{
float:right;
margin:0 0 20px 10px;
}
p.dontwrap {width:78%;}
p.indent {margin-left:10px;}
form#subscribe {
clear:both;
margin:1.5em 0 1.5em 0;
width:168px;
border:1px solid #ccc;
padding:10px;
}
|
css-reset.css file goes in the css folder
| Code: |
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: top;
}
/* remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul, li {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
html {overflow-y: scroll;} |
main_menu.css goes in the css folder
| Code: |
ul#nav, ul {
margin: 0;
padding: 0;
list-style: none;
width:190px;
border-top:1px solid #ccc;
font-size:90%;
}
ul#nav li {
position: relative;
width:190px;
float:left;
clear:left;
}
#nav li ul {
position: absolute;
top: 0;
margin-left:-999em;
min-height:0;
}
/* Styles for Menu Items */
ul#nav li a {
display:block;
text-decoration: none;
color: #fff;
line-height:2em;
padding:0 5px;
width:178px;
border: 1px solid #ccc;
border-top:none;
font-weight:bold;
}
* html ul#nav a {
width:190px;
w\idth:178px;
}
/* this sets all hovered lists to red */
#nav li:hover a,#nav li.over a,
#nav li:hover li a:hover,#nav li.over li a:hover {
color: #fff;
background-color: red;
}
/* set dropdown to default */
#nav li:hover li a,#nav li.over li a {
color: #777;
background-color: #ffffcc;
}
#nav li ul li a { } /* Sub Menu Styles */
#nav li:hover ul,#nav li.over ul { margin-left:189px; } |
The stylesheets are complete and in the correct folder, move all images into the images folder or any other folder being used to hold images. Images should not be in the root folder with html pages.
Now to build the content pages to be included in each page. These files go in the inc folder.
This will be the index.shtml page and goes in the root folder.
| Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Your title here</title>
<link href="css/master.css" rel="stylesheet" type="text/css" media="all" />
<!--[if lt IE 7]>
<script type="text/javascript">
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" over";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" over\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
</script>
<![endif]-->
</head>
<body>
<div id="container">
<!--#include file="inc/top.html" -->
<div id="content">
<div class="wrapper">
<!--#include file="inc/home_content.html" -->
</div>
</div>
<div id="sidebar">
<!--#include file="inc/sidebar.html" -->
</div>
<div id="footer">
<!--#include file="inc/footer.html" -->
</div>
</div>
</body>
</html> |
These files go in the inc folder and will be repeatedly used except for the home_content.html page which is only for the index page.
top.html
| Code: |
<div id="header"></div>
<div id="mast"><p><a href="/711artopening.html">Visions of Soul </a> Psychic Art </p></div> |
home_content.html
| Code: |
<p class="dontwrap"><strong>Neela Bindu, Master Alternative Therapist, </strong>has been bringing transformational healing and balance into people's lives for over 30 years. She has studied with masters in the USA, Europe, <a href="/Slides/1.html">India</a>, and the Philippines. While living in the Philippines, she worked side by side with top psychic surgeons, receiving transmission of the healing energies. After earning her certification in healing arts, she lived and travelled extensively through India, spending much time in the Himalayas, at ashrams, with saints, yogis, and in meditation and retreat. She is versatile and compassionate, a Master therapeutic practitioner and teacher with highly developed skills and knowledge. She can guide and help you, physically, emotionally, mentally, and spiritually. </p>
<div class="image-container dontwrap">
<img src="images/NeelasFaceweb.jpg" alt="" />
<p class="dontwrap">In 1997, she created and developed the healing art of Acu-Ki ℠ . Later, she developed her own hypnotherapy technique called Transformational Hypnotherapy℠. She received her certification in Acupressure in California from the Jin Shin Do Foundation and is also certified in traditional Acupressure. She received her certification in Hypnotherapy from the Alchemical Hypnotherapy Institute in Santa Fe, New Mexico. She received training and Master certification in all systems of Reiki Healing through the William Rand Foundation, which teaches the original Japanese Reiki system. She received certification in Body Alignment Therapy and Breath Technique from the American Yoga Foundation, Bovina, New York. </p>
</div>
<p class="dontwrap">Through most of her life, Neela has been using the medium of art to create and express, in 1999, she developed a technique called Psychic Art <span class="style7">SM</span>.. She is a natural born psychic and healer who has deepened her abilities through her direct experience of the Divine. </p>
<p class="bottom"><img src="images/DynamicHealing2.gif" alt="Dynamic Healing and Awareness" width="630" height="50"></p> |
sidebar.html
| Code: |
<ul id="nav">
<li><a href="#">Home </a></li>
<li><a href="#">Acu Ki ℠ </a></li>
<li><a href="#">Channeled Readings </a></li>
<li><a href="#">Meditation Intensive & Mantra Initiation </a></li>
<li><a href="#">Travels </a>
<ul>
<li><a href="#">India </a></li>
<li><a href="#">Beijing, China </a></li>
<li><a href="#">Psychic Art ℠ </a></li>
</ul>
</li>
<li><a href="#">Art Shows </a>
<ul>
<li><a href="#">Shifting Colors of Light </a></li>
<li><a href="#">"Visions of Soul" </a></li>
<li><a href="#">Peter Jones Gallery </a></li>
</ul>
</li>
<li><a href="#">Acrylics on Canvas</a></li>
<li><a href="#">Reiki</a></li>
<li><a href="#">Tarot</a></li>
<li><a href="#">Transformational Hypnotherapy ℠</a></li>
</ul>
<br class="clearer" />
<form id="subscribe" method="POST" action="http://www.progressivelifetherapy.com/cgi-bin/autoresponder/ar.cgi">
<input type="hidden" name="mode" value="optin">
<input type="hidden" name="ar" value="neela">
<table border="1" cellSpacing="0" bgcolor="#990000" cellpadding="2">
<tr>
<td align="right">Name:</td>
<td><input type="text" name="user" size="15"></font></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="right">Email:</td>
<td><input type="text" name="email" size="15"></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="Subscribe" name="B1"></td>
</tr>
</table>
</form>
<p class="indent"><a href="mailto:neelaatprogressivelifetherapy.com">Contact</a></p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p> |
footer.html
| Code: |
| <p>© Copyright 2008 • All Rights Reserved • Progressive Life Therapy, Inc.</p> |
Study the css and the html on the index page and you'll see what is happening to get the layout. The index oage can be used as a template for all pages, just copy, paste to a blank page and change the main content page that is being included. In this case it is the home_content.html page. Nothing else has to be changed. The IE conditional statement is for the menu to work in IE6. If your not supporting IE6 it can be deleted.
If you find this layout doesn't work for you there is an alternative of using an image as the main background for the content that will work. Let me know if there are problems. |
|
cmrsf1
Joined: 01 Nov 2009 Posts: 5
|
Posted: Mon Nov 02, 2009 5:47 pm |
|
|
|
Truthfully? I am blown away that you have taken the time to compile all of this! I will work with it and see what I come up with and let you know.
Thanks! |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|