Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-08-2012, 09:06 PM   PM User | #1
gathoni
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
gathoni is an unknown quantity at this point
Cannot create new file from Dreamweaver template

Hi

Just done my first website on dreamweaver. Then decided to seperate the HTML from the CSS. Now when I try to create a new file from the template in Dreamweaver I get a message that there is an error at line 185 (there is no line 185). The container div seems to be an issue bu I don't know how to fix it.

Here is a copy of the HTML. Thanks in advance for any help with this.

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>
<link rel="stylesheet" type="css" href="test.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="...." />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
</head>


<body class="container">

	<div class="header"><!-- TemplateBeginEditable name="Header" --><img src="../Live/images/headerindex.jpg" name="Insert_logo"width="960" height="148" border="0" id="Insert_logo" style="background: #C6D580; display:block;" /><!-- TemplateEndEditable -->
  <!-- end .header --></div>
  <div class="sidebar1">
  <ul class="nav">
      <li><a href="../Live/index.html">Home</a></li>
      <li><a href="../Live/search.html">Parts Search</a></li>
      <li><a href="../Live/sell.html">Sell Your Vehicle</a></li>
      <li><a href="http://stores.ebay.co.uk/Big-Red-Motor-Spares" target="_blank">Ebay Shop</a></li>
      <li><a href="../Live/contact.html">Contact Us</a></li>
    </ul>
   
    <p><!-- TemplateBeginEditable name="Button 1" --><a href="../Live/search.html"><img src="../Live/images/search-for-parts.gif" width="120" height="120" alt="parts search" /></a><!-- TemplateEndEditable --></p>
    <p><!-- TemplateBeginEditable name="Button 2" --><a href="../Live/sell.html"><img src="../Live/images/sell-your-vehicle.gif" width="120" height="120" alt="sell your vehicle" /></a><!-- TemplateEndEditable --></p>
<!-- end sidebar --></div>
  <div class="content">
    <div id="content"><!-- TemplateBeginEditable name="Content" -->
      <h1>Quality Used Vehicle Parts</h1>
      <p>Here at Big Red Motor Spares we pride ourselves in supplying good quality, OEM, used parts at competitive prices to both the public and trade.</p>
    <!-- TemplateEndEditable -->
    <!-- end .content -->
    </div>
     
<!-- TemplateBeginEditable name="Footer" -->
  <div class="footer">
  <p class="note">© 2012 Big Red Motor Spares</p>
  <!-- end footer -->
</div>
<!-- TemplateEndEditable -->

</body>
</html>

Last edited by Inigoesdr; 12-08-2012 at 09:55 PM..
gathoni is offline   Reply With Quote
Old 12-08-2012, 10:09 PM   PM User | #2
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 849
Thanks: 67
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
What does the error message say?

One tip - steer well clear of DW.

Regards,

LC.
LearningCoder is offline   Reply With Quote
Old 12-08-2012, 11:49 PM   PM User | #3
waxdoc
Regular Coder

 
Join Date: Jul 2008
Posts: 155
Thanks: 9
Thanked 13 Times in 13 Posts
waxdoc is an unknown quantity at this point
Dreamweaver phobia?

Dreamweaver is a wonderful, helpful, time-saving, error-correcting, etc. editing tool so cannot understand why some denounce DW out of hand.

However "Templates" are not my favorite. In DW, under MODIFY menu you have options >Template>Check Syntax and/or >Detach From Template.

Is the error message perhaps referring to the CSS file? There may be errors I have not checked but suspect you should start anew with proper CSS link path set up beforehand. You need to define a root site folder and save your template doc to that site's Template folder, then choose FILE>New>from that template doc. [see screen shot]

Why <body class="container">? Would think it should be an ID such as <body id="home"> ?

See scren shot of message below and correct your template to move <--editable region--> markers outside block elements
Code:
<body class="container">

<!-- TemplateBeginEditable name="Header" -->
<div class="header"><img src="../Live/images/headerindex.jpg" name="Insert_logo"width="960" height="148" border="0" id="Insert_logo" style="background: #C6D580; display:block;" />
  <!-- end .header --></div>
<!-- TemplateEndEditable -->
  
  <div class="sidebar1"> ...
 
    <!-- TemplateBeginEditable name="Button 1" -->
<p><a href="../Live/search.html"><img src="../Live/images/search-for-parts.gif" width="120" height="120" alt="parts search" /></a></p>
<!-- TemplateEndEditable -->
    
<!-- TemplateBeginEditable name="Button 2" -->
<p><a href="../Live/sell.html"><img src="../Live/images/sell-your-vehicle.gif" width="120" height="120" alt="sell your vehicle" /></a></p>
<!-- TemplateEndEditable -->
...
P.S. I would create an overall <DIV> to contain all the page content, such as
Code:
#wrap { margin: 0 auto; margin: 0 auto; width: 85%; max-width:950px; min-width: 250px;  position: relative; background: rgba(255,255,255,0.25);  z-index: 400;   }
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2012-12-08 at 6.10.44 PM.jpg
Views:	19
Size:	44.9 KB
ID:	11775   Click image for larger version

Name:	Screen shot 2012-12-08 at 6.36.25 PM.png
Views:	20
Size:	21.8 KB
ID:	11776  

Last edited by waxdoc; 12-09-2012 at 12:09 AM.. Reason: add screen shots & P.S.
waxdoc is offline   Reply With Quote
Old 12-09-2012, 12:39 AM   PM User | #4
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 849
Thanks: 67
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Quote:
Originally Posted by waxdoc View Post
Dreamweaver is a wonderful, helpful, time-saving, error-correcting, etc. editing tool so cannot understand why some denounce DW out of hand.
It's just my own personal view, used it for the first time at college 2 weeks ago on monday. Talk about over complicating something which doesn't need to be.

It's probably the thought that it generates the HTML, I'd much prefer to hand code it as you know exactly what code you have. Not only that hand coding helps you to really understand what you're working with IMO.

Quote:
Why <body class="container">? Would think it should be an ID such as <body id="home"> ?
I think also, you should just style/target the body using the global element style like this:
Code:
body
{

}
as there will only ever be 1 <body> element on any given page. I don't think it's necessary to add a class or id.

Regards,

LC.

Last edited by LearningCoder; 12-09-2012 at 12:42 AM..
LearningCoder is offline   Reply With Quote
Old 12-09-2012, 11:47 AM   PM User | #5
gathoni
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
gathoni is an unknown quantity at this point
Hi

Thanks for your help, I have managed to sort out the container issue, now the page footer is displaying correctly. I still have a problem with creating files from this template.

When I try, the error message reads........

"There is an error at line 185, column 13 (absoloute position4245) of (...file location and name.....) : Unbalanced #EndEditable tag."

I have tried to check the editable tags opening and closing, but I can't see the error.

Any ideas?
gathoni is offline   Reply With Quote
Old 12-09-2012, 04:50 PM   PM User | #6
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Your div with class "content" is unclosed, according to the code in your first post. This may be the problem.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Old 12-10-2012, 10:23 PM   PM User | #7
waxdoc
Regular Coder

 
Join Date: Jul 2008
Posts: 155
Thanks: 9
Thanked 13 Times in 13 Posts
waxdoc is an unknown quantity at this point
always define site ROOT folder

Hard to guess what problem is, but always gather your files together in a folder and SITE>New Site -- define that site root folder and save all your files to that site root folder. Think you should have an index.html page in root folder. I would create and validate sample page before saving as a template ___.dwt file. You then save that template file to the site root folder you defined in the very beginning. Dreamweaver saves that .DWT file in a Template folder it creates.

See screen shot above.

One of the many nice features of Dreanweaver is that, when you type lesser-than symbol and slash </ , it completes any open tag that needs closing. This not only saves a bit of extra typing, it shows you what tag needs closing.

It's best to work in code pane of SPLIT view or in CODE view. And, obviously, you can write your own code.

Last edited by waxdoc; 12-10-2012 at 10:35 PM.. Reason: typo
waxdoc is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:52 AM.


Advertisement
Log in to turn off these ads.