PDA

View Full Version : template trouble


cnelson
08-12-2008, 05:23 AM
why the heck is my template formatting completly screwy when I open a new page using the template?? Happening whehther or not I create


GRRR!!!

cnelson
08-12-2008, 05:24 AM
oops...whether or not I create editable markups

edbr
08-12-2008, 05:36 AM
my crystal ball doesnt know. post your code of a page made from the template

cnelson
08-12-2008, 05:41 AM
see code below...

<!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" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link href="Gallery Template.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body bgcolor="#000000" class="twoColFixLtHdr" onload="MM_preloadImages('../Buttons/about over.jpg','../Buttons/painting over.jpg','../Buttons/photo over.jpg','../Buttons/mixed over.jpg','../Buttons/contact over.jpg','../Buttons/Lbtnover.jpg','../Buttons/Mbtnover.jpg','../Buttons/Sbtnover.jpg')">

<div id="container">
<div id="sidebar1">
<table width="250" border="0" align="center" cellspacing="10" bgcolor="#000000" id="buttons">
<tr>
<td width="26"><a href="../Simple Pages/testy2.html" target="mainframe" onmouseover="MM_swapImage('Image6','','../Buttons/Lbtnover.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="../Buttons/Lbutton.jpg" name="Image6" width="26" height="26" border="0" id="Image6" /></a></td>
<td width="25"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','../Buttons/Mbtnover.jpg',1)"><img src="../Buttons/Mbutton.jpg" name="Image7" width="25" height="25" border="0" id="Image7" /></a></td>
<td width="25"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','../Buttons/Sbtnover.jpg',1)"><img src="../Buttons/Sbutton.jpg" name="Image8" width="25" height="25" border="0" id="Image8" /></a></td>
<td width="72">&nbsp;</td>
<td width="8">&nbsp;</td>
<td width="12">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<!-- end #sidebar1 -->
</div>
<div class="twoColFixLtHdr" id="mainContent">

<iframe src="../Simple Pages/testimage.html" name="mainframe" width="550" marginwidth="0" height="400" marginheight="0" align="middle" scrolling="No" frameborder="0"></iframe>
&nbsp;
<!-- end #mainContent -->

<pre>&nbsp; </pre>
</div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />

<div id="footer">
<table width="800" border="0" align="center" bgcolor="#000000" id="menu">
<tr>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','../Buttons/about over.jpg',1)"><img src="../Buttons/about.jpg" name="About" width="125" height="25" hspace="16" border="0" id="About" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','../Buttons/painting over.jpg',1)"><img src="../Buttons/painting.jpg" name="Painting" width="125" height="25" hspace="16" border="0" id="Painting" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','../Buttons/photo over.jpg',1)"><img src="../Buttons/photo.jpg" name="Photography" width="125" height="25" hspace="16" border="0" id="Photography" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','../Buttons/mixed over.jpg',1)"><img src="../Buttons/mixed.jpg" name="mixed" width="125" height="25" hspace="16" border="0" id="mixed" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','../Buttons/contact over.jpg',1)"><img src="../Buttons/contact.jpg" name="contact" width="125" height="25" hspace="16" border="0" id="contact" /></a></td>
</tr>
</table>
main
<!-- end #footer -->
</div>
<!-- end #container --></div>
</body>
</html>

cnelson
08-12-2008, 05:42 AM
and code from a page made from above template


<!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"><!-- InstanceBegin template="/Templates/Gallery Template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="Gallery Template.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body bgcolor="#000000" class="twoColFixLtHdr" onload="MM_preloadImages('Buttons/about over.jpg','Buttons/painting over.jpg','Buttons/photo over.jpg','Buttons/mixed over.jpg','Buttons/contact over.jpg','Buttons/Lbtnover.jpg','Buttons/Mbtnover.jpg','Buttons/Sbtnover.jpg')">

<div id="container">
<div id="sidebar1">
<table width="250" border="0" align="center" cellspacing="10" bgcolor="#000000" id="buttons">
<tr>
<td width="26"><a href="Simple Pages/testy2.html" target="mainframe" onmouseover="MM_swapImage('Image6','','Buttons/Lbtnover.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="Buttons/Lbutton.jpg" name="Image6" width="26" height="26" border="0" id="Image6" /></a></td>
<td width="25"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','Buttons/Mbtnover.jpg',1)"><img src="Buttons/Mbutton.jpg" name="Image7" width="25" height="25" border="0" id="Image7" /></a></td>
<td width="25"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','Buttons/Sbtnover.jpg',1)"><img src="Buttons/Sbutton.jpg" name="Image8" width="25" height="25" border="0" id="Image8" /></a></td>
<td width="72">&nbsp;</td>
<td width="8">&nbsp;</td>
<td width="12">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<!-- end #sidebar1 -->
</div>
<div class="twoColFixLtHdr" id="mainContent">

<iframe src="Simple Pages/testimage.html" name="mainframe" width="550" marginwidth="0" height="400" marginheight="0" align="middle" scrolling="No" frameborder="0"></iframe>
&nbsp;
<!-- end #mainContent -->

<pre>&nbsp; </pre>
</div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" />

<div id="footer">
<table width="800" border="0" align="center" bgcolor="#000000" id="menu">
<tr>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','Buttons/about over.jpg',1)"><img src="Buttons/about.jpg" name="About" width="125" height="25" hspace="16" border="0" id="About" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','Buttons/painting over.jpg',1)"><img src="Buttons/painting.jpg" name="Painting" width="125" height="25" hspace="16" border="0" id="Painting" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','Buttons/photo over.jpg',1)"><img src="Buttons/photo.jpg" name="Photography" width="125" height="25" hspace="16" border="0" id="Photography" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','Buttons/mixed over.jpg',1)"><img src="Buttons/mixed.jpg" name="mixed" width="125" height="25" hspace="16" border="0" id="mixed" /></a></td>
<td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','Buttons/contact over.jpg',1)"><img src="Buttons/contact.jpg" name="contact" width="125" height="25" hspace="16" border="0" id="contact" /></a></td>
</tr>
</table>
main
<!-- end #footer -->
</div>
<!-- end #container --></div>
</body>
<!-- InstanceEnd --></html>

edbr
08-12-2008, 05:51 AM
<link href="Gallery Template.css" rel="stylesheet" type="text/css" />
is the same in template and file , ii the template in the same folder as the pages?

cnelson
08-12-2008, 05:55 AM
no...they're under the same site but the template is in a template folder...
the page is just in the site

edbr
08-12-2008, 06:00 AM
then its the link to the style sheet i would say. I forget the procedure with templates but you have to update links. it looks that the style sheet is in the template folder so the link should be templates/Gallery Template.css".
you could move (or copy the stylesheet to the root directory .
Try it anyway

cnelson
08-12-2008, 06:21 AM
Argh!!
So i deleted all the files of pages I tried making from the template to start fresh and it's still doing it. Basically in the template the div tags are side-by side with a footer. In the page created from template it puts the two divs on on over the other instead of next to eachother. What the heck!!
Instead of:

div1 div2
div3

it makes it

div1
div2
div 3

interms of layot.
make sense kinda??