PDA

View Full Version : Help with code...


cradl
05-28-2010, 04:29 PM
Ok I have this template and when I try to assign it to a page I get (Document Head not resolved)? Could you take a look at my code?
Thanks

<!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 -->
<link href="../Main.css" rel="stylesheet" type="text/css" />
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>
<div id="container">
<div id="header">
<h1><a href="#"><img src="../LG8.jpg" width="850" height="200" alt="logo" /></a> </h1>
</div><!--End Header-->
<div id="wrapper"><!-- TemplateBeginEditable name="Content" -->
<div id="content">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquet elit id augue. Duis rutrum. Praesent massa lectus, malesuada ut, sollicitudin eu, adipiscing id, lacus. Pellentesque scelerisque. In quam nunc, vulputate adipiscing, tincidunt nec, faucibus eget, libero. Integer nec nisi. Praesent iaculis posuere elit. Donec eleifend adipiscing justo. Fusce imperdiet dignissim sapien. Nullam id felis. Aliquam venenatis dapibus felis. Proin vel libero. Nunc sem.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquet elit id augue. Duis rutrum. Praesent massa lectus, malesuada ut, sollicitudin eu, adipiscing id, lacus. Pellentesque scelerisque. In quam nunc, vulputate adipiscing, tincidunt nec, faucibus eget, libero. Integer nec nisi. Praesent iaculis posuere elit. Donec eleifend adipiscing justo. Fusce imperdiet dignissim sapien. Nullam id felis. Aliquam venenatis dapibus felis. Proin vel libero. Nunc sem. </p>
</div>
<!-- TemplateEndEditable -->
<!--End Content-->
</div><!--End Wrapper-->
<!-- TemplateBeginEditable name="nav" -->
<div id="left">
<div id="sidebar">
<ul>
<li><a href="#">Home </a></li>
<li><a href="#">About Us </a></li>
<li><a href="#">Services </a></li>
<li><a href="#">Johnny Shriver </a></li>
<li><a href="#">For Sale </a></li>
<li><a href="#">Pictures </a></li>
<li><a href="#">Contact Us </a></li>
<li><a href="#">??? </a></li>
</ul>
</div>
<!--End Sidebar-->
</div>
<!-- TemplateEndEditable -->
<!--End Left-->
<div id="footer">
<div id="bottom_nav"><!-- TemplateBeginEditable name="bottom_nav" -->Home | About Us | Services | Johnny Shriver | For Sale | Pictures | Contact Us<!-- TemplateEndEditable -->
<div id="footer_info"><!-- TemplateBeginEditable name="footer_info" -->
<table width="100" border="0" align="center">
<tr>
<td align="center">lgsaddlebreds@gmail.com</td>
</tr>
<tr>
<td align="center">Phone: 502-321-1998</td>
</tr>
<tr>
<td align="center">Phone: 502-220-1601</td>
</tr>
<tr>
<td align="center">795 Locust Grove Rd.</td>
</tr>
<tr>
<td align="center">Shelbyville, KY. 40065</td>
</tr>
</table>
<!-- TemplateEndEditable -->
<div id="copyright"><!-- TemplateBeginEditable name="copyright" -->&copy; 2010 - Locust Grove Saddlebreds - All Rights Reservied<!-- TemplateEndEditable --></div>
</div>
</div></div>
<!--End Footer-->

</div><!--End Container-->
</html>

DWcourse
05-28-2010, 05:30 PM
When you get that message in the Inconsistent Region Names dialog choose either "head" or "nowhere" from the Move content to new region menu at the bottom of the dialog.

Choosing "head" will retain any content (style sheet or js links for instance) in the <head> of your page when the template is applied.

Choosing "nowhere" discards the info in the <head> of your document.

cradl
05-28-2010, 05:52 PM
So my code looks good then. If I choose head it puts (doctile and untitled document above the header left corner in ediable region markers.

DWcourse
05-28-2010, 06:29 PM
OH, now I see what you're saying. Somehow your page doesn't have opening and closing body tags. You need to add them.

</head>
<body>
<div id="container">

</div><!--End Container-->
</body>
</html>

cradl
05-28-2010, 06:46 PM
ok works. Now I have one other problem. If I put solid color in footer it works. When I but custom pic for bg it has a section at the bottom of the page after the footer. The little off white section. See Image.

DWcourse
05-28-2010, 08:02 PM
looks like your background image isn't tall enough to fill the footer div

cradl
05-28-2010, 08:06 PM
yes it is the same size as footer

DWcourse
05-28-2010, 09:32 PM
yes it is the same size as footer

In that case we'd need to see the actual page can you post it somewhere and give us a link?

And, btw, by making every section of the template an editable region, you're basically eliminating the reason for templates. Only the areas that you ant different on each page should be in and editable region. Your menu and copyright info for instance should probably be in a non-editable region. That way you can update the template and, when you save it, allow the change to template to update all your pages.

cradl
05-28-2010, 10:19 PM
where could I post it?

DWcourse
05-28-2010, 11:35 PM
You don't have a webhost for you site?

cradl
05-29-2010, 12:17 AM
I got it. I figured I would try a bigger bg. I made it 20px bigger. It was due to padding. Thanks for everything. Im still working on it so I may have more questions.