View Full Version : Using templates

02-01-2010, 07:24 PM
I have upgraded from 8 to CS4 and am having real problems with my templates. When I amend a template and save it, all the navbars shift and everything moves.

Am I missing something I should have saved or uploaded? I cannot update any of my website templates until I get this fixed, please help!
I can amend single pages with no problem, it's only the template peage I'm hving a problem with, can anybody help?

02-02-2010, 02:45 AM
What is moving and where?
If you can give a link, that would be best.

02-02-2010, 04:19 AM
8 to CS4 shouldn't cause problems. Exactly what are you doing to the template when you have the problem?

And does it just affect the design view? Or does it affect the actual display of the page in a browser?

02-02-2010, 06:35 AM
Hi there,

It changes how the page looks in the browser. The template looks no different in Dreamweaver, but when I open the pages in DW, or view them in my browser, nothing is where it should be.

Could it be the CSS sheet is somehow unattached to the template? If so, how would I check it's attached?

Many thanks,

02-02-2010, 08:15 AM
Once again! Provide us a link to your page or paste here your full code (CSS & HTML) so that we can see what's wrong.

02-02-2010, 04:39 PM
The link to it is:


and it should look like:


02-02-2010, 04:56 PM
The link to it is:


and it should look like:


I see...

In your broken index you're external stylesheet '3col_leftNav.css' is pointing to the root while the stylsheet, according to the normal index page, is in the templates folder.


<link rel="stylesheet" href="3col_leftNav.css" type="text/css" />


<link rel="stylesheet" href="Templates/3col_leftNav.css" type="text/css" />

So change the path and problem is solved.

02-02-2010, 05:04 PM
You've actually saved your css file in the Templates folder (which isn't a good idea). Move it out of there, update the template to the new location and see if it works.

02-02-2010, 05:16 PM
So I've moved the 3col_leftNav.css to the root directory as discussed by DWcourse.

This means I have no directories to update the link as advised by gentleone, am I right?

I just wanted to confirm before I update the pages and it goes wonky again!

02-02-2010, 05:59 PM
actually in your Template the link should become

<link rel="stylesheet" href="../3col_leftNav.css" type="text/css" />

And on your root level pages the link should now be

<link rel="stylesheet" href="3col_leftNav.css" type="text/css" />

An alternative is to use root relative links. then in the template you have

<link rel="stylesheet" href="/3col_leftNav.css" type="text/css" /> and the same in all the other pages.

This is assuming you didn't somehow put the link to your style sheet in an editable region in which case in won't update when you update the template.

02-02-2010, 06:15 PM
Something went wrong...

<!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">
<!-- DW6 -->
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="/3col_leftNav.css" type="text/css" />
<style type="text/css">

02-02-2010, 06:20 PM
actually that looks good (i'd upload it to check)

Sometimes preview in browser chokes on root relative links unless the preview with temporary file is chosen.

02-02-2010, 09:27 PM
No, just realised I've been a massive mong and didn't upload the css file to the new location. Bloody hell just put me in a straitjacket!

You are a legend, thank you so much for your help. I will update my other websites in the same way and pull out the style sheet from the templates folder, use your link above and upload the css file correctly. I'll let you know if I get through it all okay.

For now, I'm going to make a cuppa and relax in front of the DVD player...the other websites can burst my head tomorrow!

Thank you so much, it's fantastic to have it working again.