Link to home
Start Free TrialLog in
Avatar of savache27
savache27

asked on

Dreamweaver template from page not rendering css

Hi,

I have an html page that I have created in Dreamweaver. I wanted to save it as a template. When I do that, I remove the "main content" that was in that page and insert and editable region in it's place. I then create a new page from template and it when I preview it, it's like it's not rendering the css file. The page should be in the center, but instead it starts at the left side of the screen. It's also not showing the css styles, etc. It's strange really, because it's like it's picking up some of it, but not all of it. Any ideas??
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of savache27
savache27

ASKER

Okay, it's weird because the child file is saving like this at the top:

<!-- InstanceBegin template="/Templates/index_test.dwt" codeOutsideHTMLIsLocked="false" --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Enter your site's description inside the content value below. Search Engine's will display this text in their results. -->
<meta name="Description" content=""/>
<!-- Enter your site's keywords inside the content value below. Choose words/acronyms that describe your site. -->
<meta name="Keywords" content="US Army, Army, Army News, ARMY.mil, Headlines, Public Affairs, Official Army Homepage, Hot Topics, Images, Video, Audio, AMP, Social Media, Leaders, History, Organization, Service, AKO"/>
<!-- InstanceBeginEditable name="doctitle" -->

Open in new window


If I copy the code and move this part

<!-- InstanceBegin template="/Templates/index_test.dwt" codeOutsideHTMLIsLocked="false" -->

below this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Then it seems to work. What am I doing to cause it to save like that?
Not sure.  What does the DWT code look like?
This is the .dwt code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Enter your site's description inside the content value below. Search Engine's will display this text in their results. -->
<meta name="Description" content=""/>
<!-- Enter your site's keywords inside the content value below. Choose words/acronyms that describe your site. -->
<!-- TemplateBeginEditable name="doctitle" -->
<title>Title</title>
<!-- TemplateEndEditable -->
<link rel="stylesheet" type="text/css" href="../css/root2.css"/>
	<!--[if IE 6]>
	    <link rel="stylesheet" type="text/css" href="rv4_css/ie6.css" />
	<![endif]-->
    <!--[if IE 7]>
        <link rel="stylesheet" type="text/css" href="rv4_css/ie7.css" />
    <![endif]-->
    <script type="text/javascript" src="../js/utility.js"></script>
    <script type="text/javascript" src="../js/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="../js/superfish.js"></script>
    <script type="text/javascript" src="../js/jquery.hoverIntent.min.js"></script>
    <script type="text/javascript" src="../js/jqueryui.slide.min.js"></script>
    <script type="text/javascript" src="../js/dropDown.js"></script>
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
</head>
<body>
    <div id="wrapper"><div id="container">
        <div id="header">
            <a id="headerStar" href="http://www.test.com/"></a>
        </div>
        
     <!--  TOP NAVIGATION        <div id="navBar">
            <ul id="dropDownNav">
                <a class="hide2" href="#skipNav">Skip main navigation</a>
				
              <li><a href="index.asp">Home</a></li>
              <li><a href="">Link</a>
                  <ul>
                      <li><a href="">Sub-Link</a></li>
                      <li><a href="">Sub-Link</a></li>
                  </ul>
              </li>
              <li><a href="">Link</a>
                  <ul>
                      <li><a href="">Sub-Link</a></li>
                      <li><a href="">Sub-Link</a></li>
                  </ul>    
              </li>
              <li><a href="">Link</a>
                  <ul>
                      <li><a href="">Sub-Link</a></li>
                      <li><a href="">Sub-Link</a></li>
                  </ul>
              </li>
              <li><a href="">Link</a>
                  <ul>
                      <li><a href="">Sub-Link</a></li>
                      <li><a href="">Sub-Link</a></li>
                  </ul>
              </li>
              <li><a href="">Link</a>
                  <ul>
                      <li><a href="">Sub-Link</a></li>
                      <li><a href="">Sub-Link</a></li>
                  </ul>
              </li>
		    </ul>
                      <a name="skipNav"></a>
      </div> -->
       
        <div id="contentBackground"><div id="leftCol">            
           
        <div id="mainContent"><!-- TemplateBeginEditable name="EditMain" -->
        
        <!-- TemplateEndEditable -->

        </div>
        <!-- end mainContent -->
        
        
    </div>
        
        <div id="footer">
            
        <div id="footerLeft">
                <a class="rss" href="http://www.test.com/rss/"><span class="textLink">RSS</span></a>
                <a class="podcasts" href="http://www.test.com/rss/podcasts/"><span class="textLink">Podcasts</span></a>
            </div>
            <div id="footerMiddle">
                   <ul>
          <span id="disclaimer"><span id="disclaimer2">*</span>The appearance of hyperlinks does not constitute endorsement.</span>
         
          </ul><br/>
                <ul>
<li><a href="http://www.test.com/508.htm" target="_blank">Section 508</a></li>
                    <li><a href="http://www.test.mil/notice.htm" target="_blank">Security and Privacy Policy</a></li>
                    <li><a href="">Contact Us</a></li>                  
                </ul>
                </div>
            <div id="footerRight">
                Need help? Try <a href="http://www.help.com/info/a-z/">A-Z</a>
         
            </div>
        </div>


            
    </div><!-- end container -->
    <!--Last Updated starts here-->   
      <div class="date">
        Last Updated: <!-- #BeginDate format:Am3 -->09/10/2012<!-- #EndDate -->
      </div><br/>
      <!--Last Updated ends here-->
</div><!-- end wrapper --></body>

</html>

Open in new window

Hmm...I redid the template and now it seems to be working. I really dislike using templates, but apparently I'm not going to be able to make server side includes work.
Hmm...I redid the template and now it seems to be working

That sometimes fixes it.  Just know in advance that templates are buggy as hell (and always have been) and keep a log of fixes that you got to work.
I know. I really don't even want to use it. For now, it's just a simple two page site, but I'm sure it can expand. Some of the sites are huge and use Dreamweaver templates. I really wanted to use the include, but when I tried to use it with .html it wouldn't work. It worked with .asp, however...I couldn't see a preview in Dreamweaver when I used asp files. Every time I tried to preview on our web draft server it asked me to save the file. When I would run it on the production server the .asp include files would work. So, I have no idea what the issue is with that. Thanks for the advice. I appreciate your help.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for all your help. I really appreciate it.