background images vanish from dwt file (Full Version)

All Forums >> [Web Development] >> Dreamweaver Help



Message


stevet -> background images vanish from dwt file (5/26/2008 16:34:08)

Hi, I have a problem with creating a page from template, My .dwt file looks good, all content present, but when I create new - template to page, all my background images vanish on the new created page (both editable and non editable areas) which I intend to use as the master page. My bg images were created in PShop and saved for web, and exist within the site files in an images folder. I am using DW CS3, and a DW div tag made up template. I've had a look around the forums but can't find an answer. Can anybody assist me? .dwt Code as follows
thanks guys
<!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 -->
<style type="text/css"> 
<!-- 
body  {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #666666;
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
	color: #000000;
	background-color: #222222;
	margin-top: 2px;
}
.twoColFixLtHdr #container { 
	width: 780px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
	background: #FFFFFF;
	margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
	border: 1px solid #000000;
	text-align: left; /* this overrides the text-align: center on the body element. */
} 
.twoColFixLtHdr #header {
	padding: 0 0px 0 0px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
	background-color: #CCCCCC;
	background-image: url(../front%20page%20slices/750x600-basic_04.gif);
	background-repeat: no-repeat;
	background-position: 500px center;
} 
.twoColFixLtHdr #header h1 {
	margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
	padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}
.twoColFixLtHdr #sidebar1 {
	float: left; /* since this element is floated, a width must be given */
	width: 135px;
	color: #FFFFFF;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-bottom-style: solid;
	border-top-color: #FFFFFF;
	border-right-color: #FFFFFF;
	border-bottom-color: #FFFFFF;
	border-left-color: #FFFFFF;
	padding-top: 5px;
	padding-right: 10px;
	padding-bottom: 15px;
	padding-left: 20px;
	background-image: url(../site%20images/sidebarfade.jpg);
	background-repeat: repeat-x;
	background-position: right top;
	font-family: verdana;
	font-size: 12px;
	font-weight: bold;
	height: auto;
	border-right-style: none;
}
.headernavbar {
	background-image: url(../front%20page%20slices/750x600-basic_10.gif);
	background-repeat: repeat-x;
	height: 15px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-bottom-style: solid;
	border-top-color: #666633;
	border-right-color: #666633;
	border-bottom-color: #666633;
	border-left-color: #666633;
}
.twoColFixLtHdr #mainContent {
	background-image: url(../site%20images/orcabg.jpg);
	background-repeat: no-repeat;
	background-position: right bottom;
	margin-top: 0;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 160px;
	padding-top: 1px;
	padding-right: 20px;
	padding-bottom: 0;
	padding-left: 20px;
} 
.twoColFixLtHdr #footer {
	background-repeat: repeat-x;
	height: 15px;
	padding-top: 0;
	padding-right: 0px;
	padding-bottom: 0;
	padding-left: 0px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-bottom-style: solid;
	border-top-color: #666633;
	border-right-color: #666633;
	border-bottom-color: #666633;
	border-left-color: #666633;
	background-image: url(../front%20page%20slices/750x600-basic_10.gif);
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #666633;
} 
.twoColFixLtHdr #footer p {
	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
	float: right;
	margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
	float: left;
	margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
	clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
.header14red {font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: bold;
	color: #550000;
}
.textgrey12 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	line-height: normal;
	color: #000000;
}
.style24 {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #666633;
}
.style25 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12;
	font-style: normal;
	line-height: normal;
	color: #FFFFFF;
}
.style26 {
	font-size: xx-small;
	color: #666600;
}
--> 
</style>
<!--[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]-->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>

<body class="twoColFixLtHdr">

<div id="container">
  <div id="header"> <img src="../front page slices/750x600-basic_01.jpg" width="394" height="75" /><br />
    <img src="../front page slices/750x600-basic_06.jpg" width="394" height="75" /><br />
      <!-- end #header -->
  </div>
  <div class="headernavbar" id="headernavbar">
    <div align="center"><span class="style24">Fishin' | Maps and Tracks | Ocean Beach | Accomodation | News</span></div>
  </div>
  <div id="sidebar1">
    <p align="right" class="style25">Home</p>
    <p align="right" class="style25">Lifestyle</p>
    <p align="right" class="style25">Photo Gallery</p>
    <p align="right" class="style25">Guestbook</p>
    <p align="right" class="style25">Contact Us</p>
    <p align="right" class="style25">Links</p>
    <p><br />
        <img src="../site images/stingraytrans.gif" width="124" height="146" /> </p>
    <h3> </h3>
    <p> </p>
    <p> </p>
    <p><br />
      <!-- end #sidebar1 -->
    </p>
  </div>
  <div id="mainContent"><!-- TemplateBeginEditable name="maincontent" -->
  <div class="maincontentpics">
    <div class="maincontentpics">
      <h1><img src="../site images/peak.jpg" width="127" height="124" /><img src="../front page slices/750x600-basic_17.jpg" alt="Taurikura Bay from Mount Manaia." width="286" height="124" /><img src="../site images/oldtaurikurawharf.jpg" alt="The old Taurikura wharf, pulled down 2006, a great kigfish fishing spot." width="159" height="124" /></h1>
    </div>
  </div>
  <p><span class="header14red">Taurikura Bay</span><br />
      <span class="textgrey12">The central Bay of the semicircle at the end of the upper  Whangarei harbour, on the Whangarei Heads Road,  a quiet, fishing, diving, lifestyle piece of paradise. 30  minutes from town means far enough away from the bustle and traffic, with the  weekends providing enough of a beach frame of mind to make retirement seem a  desirable option. The kind of place where kicking back happens almost  automatically.</span></p>
  <p><span class="textgrey12">Dolphins  and Orcas in the shallows in the bay in November when the stingrays come in  with the warm water, the smell of smokers cooking up the days snapper catch,  the sound of beach tractors launching boats early in the morning, outboards  crackling on the wash and cleanup, netting for herrings, family groups on the  foreshore...<br />
        <br />
    </span><span class="header14red">Welcome to Taurikura</span><br />
    <span class="textgrey12">3 hours from Auckland, 10 years  from hustle and bustle.<br />
      There's  always something happening … if you look for it.</span></p>
  <p> </p>
  <p> </p>
  <!-- TemplateEndEditable --></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">
      <div align="center"> <span class="style26">Serendipity Design</span>
          <!-- end #footer -->
      </div>
    </div>
<!-- end #container --></div>
</body>
</html>




swoosh -> RE: background images vanish from dwt file (5/26/2008 16:41:00)

quote:

background-image: url(../front%20page%20slices/


Is that the correct location?




stevet -> RE: background images vanish from dwt file (5/26/2008 16:45:24)

I'v noticed that, but I have replaced the image several times in my background style, and it still keeps putting that line in the final code, I'm a bit new to editing it, but it does seem like a broken link problem.




jaybee -> RE: background images vanish from dwt file (5/26/2008 17:08:57)

%20 is a space. Do not use spaces in your file names or folder names. If you need to separate words use _ or -.

Spaces in file names cause more problems than anything else.




jaybee -> RE: background images vanish from dwt file (5/26/2008 17:13:58)

quote:

url(../site


You also need to make sure the relative url is correct.

For example, you can have one page that refers to a file by ../images/pic.jpg and the reference will work fine.

if you then copy that page and save it in a folder at a different level ../images will no longer work. It might need to be ../../images or /images.




stevet -> RE: background images vanish from dwt file (5/26/2008 17:32:55)

That's narrowing it down, it's obviously in that link somehow, thanks for the input. I'll have another crack at it tonight when I get home. If anyone else has any ideas please post.




d a v e -> RE: background images vanish from dwt file (5/27/2008 1:43:12)

why arenīt you using an external css file?




stevet -> RE: background images vanish from dwt file (5/27/2008 2:05:26)

I WIN, I WIN!!!Problem all sorted thanks to all your advice, yup a space in a folder name (duh) - bin usin Photoshop too much and not using DW enough,
My first foray into div tags and CSS, and still have a lot to learn, looks like external SS are next.
Thanks again guys




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125