Sidebar background en templates

Status
Niet open voor verdere reacties.

Reimpje

Gebruiker
Lid geworden
12 feb 2011
Berichten
19
Ik heb een site gemaakt met twee sidebars en een in het midden een content. Deze drie onderdelen heb ik allemaal een verschillende background gegeven (deze wil ik kunnen aanpassen). Van mijn site heb ik vervolgens een template gemaakt en de drie bovengenoemde onderdelen "editable" gemaakt.

Maar als ik nu een HTML op basis van mijn template wil maken, krijg ik de background images niet te zien. Sterker nog, als ik ze handmatig wil invoeren krijg ik de boodschap: "Making this change will require changing code that is locked by a template or translator. The change will be discarded."

Ik hoop dat iemand mij kan uitleggen waarom het niet werkt. Ik ben nog maar een Dreamweaver-beginner.... :o
 
Ik heb maar de hele code gekopieerd (sorry, ik heb hier nog niet zoveel ervaring mee)...van het nieuwe HTML bestand, op basis van de template. Of bedoelde je de code van de template?

<!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"><!-- InstanceBegin template="/Templates/raimke_home.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>De website van Raimke</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
margin: 0;
padding: 0;
color: #000;
font-size: 100%;
background-image: url();
}

/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
text-align: right;
}
h1, h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 15px;
padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size: 15px;
}
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
}

/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color:#000;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}
a:visited {
color: #000;
text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
}

/* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */
.container {
width: 960px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */
background: #FFF; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */
height: 379px;
font-family: Tahoma, Geneva, sans-serif;
}

/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
.header {
height: 20px;
width: 960px;
line-height: normal;
}

/* ~~ These are the columns for the layout. ~~

1) Padding is only placed on the top and/or bottom of the divs. The elements within these divs have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

2) No margin has been given to the columns since they are all floated. If you must add margin, avoid placing it on the side you're floating toward (for example: a right margin on a div set to float right). Many times, padding can be used instead. For divs where this rule must be broken, you should add a "display:inline" declaration to the div's rule to tame a bug where some versions of Internet Explorer double the margin.

3) Since classes can be used multiple times in a document (and an element can also have multiple classes applied), the columns have been assigned class names instead of IDs. For example, two sidebar divs could be stacked if necessary. These can very easily be changed to IDs if that's your preference, as long as you'll only be using them once per document.

4) If you prefer your nav on the right instead of the left, simply float these columns the opposite direction (all right instead of all left) and they'll render in reverse order. There's no need to move the divs around in the HTML source.

*/
.sidebar1 {
float: left;
width: 200px;
height: 340px;
background-image: url(file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/sidebar1_home.gif);
}
.sidebar1 p {
font-family: Tahoma, Geneva, sans-serif;
font-size: 16px;
color: #000;
text-align: right;
padding-top: 1px;
padding-bottom: 1px;
}
.content {
width: 560px;
float: left;
height: 340px;
margin: auto;
text-align: left;
vertical-align: baseline;
background-image: url(file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/content.gif);
}
.sidebar2 {
width: 200px;
height: 340px;
float: left;
background-image: url(file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/sidebar2.gif);
}

/* ~~ The navigation list styles (can be removed if you choose to use a premade flyout menu like Spry) ~~ */
ul.nav {
font-size: 18px;
font-style: oblique;
}
ul.nav li {
margin-right: 10px;
}
ul.nav a:hover, ul.nav a:active, ul.nav a:focus { /* this changes the background and text color for both mouse and keyboard navigators */
color: #FFF;
}

/* ~~The footer ~~ */
.footer {
clear: both; /* this clear property forces the .container to understand where the columns end and contain them */
height: 20px;
width: 960px;
}

/* ~~miscellaneous float/clear classes~~ */
.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. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
h1,h2,h3,h4,h5,h6 {
font-family: Tahoma, Geneva, sans-serif;
font-weight: bold;
}
h1 {
font-size: 22px;
font-family: Tahoma, Geneva, sans-serif;
font-weight: normal;
margin-top: 10px;
margin-bottom: 10px;
margin-left: 5px;
text-align: left;
margin-right: 5px;
color: #1B75BC;
}
h2 {
font-size: 18px;
margin-top: 20px;
font-family: Tahoma, Geneva, sans-serif;
margin-right: 5px;
margin-bottom: 10px;
margin-left: 5px;
font-weight: normal;
text-align: center;
}
body,td,th {
font-family: Tahoma, Geneva, sans-serif;
}
#wrapper {
width: 960px;
height: 380px;
margin-top: 100px;
margin-right: auto;
margin-bottom: auto;
margin-left: auto;
}
#bijbutton {
font-family: Tahoma, Geneva, sans-serif;
font-size: 15px;
text-align: right;
height: 170px;
color: #000;
padding: 5px;
}
h3 {
font-size: 14px;
color: #666;
}
.tekstcontent {
font-family: Tahoma, Geneva, sans-serif;
font-size: 14px;
font-style: normal;
font-weight: normal;
color: #1b75bc;
margin: 10px;
}
-->
</style><!--[if lte IE 7]>
<style>
.content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */
ul.nav a { zoom: 1; } /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */
</style>
<![endif]-->
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2885445-8']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script></head>

<body onload="MM_preloadImages('file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/home_over.gif','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/nieuws_over.gif','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/overraimke_over.gif','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/contact_over.gif','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/animatie_over.gif','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/illustratie_over.gif','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/grafisch_over.gif','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/workshop_over.gif')">
<div id="belijning">
<div id="wrapper">
<div class="container">
<div class="header">
<table width="960" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/sidebar1_b.gif" width="200" height="20" alt="sidebar1_b" /></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/home_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/home.gif" name="Home" width="140" height="20" border="0" id="Home" /></a></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Nieuws','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/nieuws_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/nieuws.gif" name="Nieuws" width="140" height="20" border="0" id="Nieuws" /></a></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Over Raimke','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/overraimke_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/overraimke.gif" name="Over Raimke" width="140" height="20" border="0" id="Over Raimke" /></a></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/contact_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/contact.gif" name="Contact" width="140" height="20" border="0" id="Contact" /></a></td>
<td width="200"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/sidebar2_b.gif" width="200" height="20" alt="sidebar2_b" /></td>
</tr>
</table>
</div>
<!-- InstanceBeginEditable name="Sidebar1" -->
<div class="sidebar1">
<h1>HOME</h1>
<div class="button" id="bijbutton2">
<p>&nbsp;</p>
</div>
</div>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="Content" -->
<div class="content">
<p><!-- end .content --></p>
<p>&nbsp;</p>
<p><span class="tekstcontent">Welkom op Raimke.com.</span></p>
<p class="tekstcontent">Op deze site kunt u een aantal animatiefilms zien, die gemaakt zijn door Raimke Groothuizen.</p>
<p class="tekstcontent">Maar ook een selectie van haar illustratief en grafisch werk is hier te zien. Met de mogelijkheid om meteen een offerte aanvraag te versturen.</p>
<p class="tekstcontent">Daarnaast staat er onder de knop 'Workshops', een beschrijving van diverse animatieworkshops. Deze geeft Raimke voornamelijk op scholen, aan zowel leerkrachten als leerlingen. </p>
<p class="tekstcontent">Voor meer informatie, vragen of opmerkingen, kunt u contact opnemen via het contactformulier op de site of stuur een mailtje naar info@raimke.com.</p>
<p class="tekstcontent">Veel plezier! </p>
<p>&nbsp;</p>
</div>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="Sidebar2" -->
<div class="sidebar2">
<!-- end .sidebar2 -->
<h2>&nbsp;</h2>
</div>
<!-- InstanceEndEditable -->
<div class="footer"><!-- end .footer -->
<table width="960" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/sidebar1_o.gif" width="200" height="20" alt="sidebar_o" /></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Animatie','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/animatie_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/animatie.gif" name="Animatie" width="140" height="20" border="0" id="Animatie" /></a></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Illustratie','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/illustratie_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/illustratie.gif" name="Illustratie" width="140" height="20" border="0" id="Illustratie" /></a></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Grafisch','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/grafisch_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/grafisch.gif" name="Grafisch" width="140" height="20" border="0" id="Grafisch" /></a></td>
<td width="140"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Workshops','','file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/workshop_over.gif',1)"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/workshops.gif" name="Workshops" width="140" height="20" border="0" id="Workshops" /></a></td>
<td width="200"><img src="file:///Macintosh HD/Users/RAIMKE/Documents/Site/Images/sidebar2_o.gif" width="200" height="20" alt="sidebar2_o" /></td>
</tr>
</table>
</div>
<!-- end .container --></div>
</div>
</div>
<div id="bijbutton"></div>
</body>
<!-- InstanceEnd --></html>
 
Is het wel mogelijk dat een HTML site vanaf een template, een editable stuk heeft met een background image?
 
oww nu zie ik het probleem de achtergrond staat lokaal en niet op de site kan dat kloppen?
 
Hoe zou ik dit kunnen oplossen?
Daarnaast staan al mijn roll-over buttons in dezelfde map als de background image van de sidebars, waarom werken die wel dan?
 
Laatst bewerkt:
hmm kan je alle betanden in een zip zetten voor me (of een ander ingepakte file extentie)
 
Nou, het was de bedoeling dat ik de site als template zou opstellen en dat de onderliggende sites dan makkelijk aan te passen waren.... Maar op een of andere manier werkt het dus niet met de backgrounds van sidebar1, sidebar2 en het content vlak, als ik er HTLM van maak... IK ben wel een beetje een Dreamweaver-faler :(
 
heb je de site ergens van gedownload?(de template)(ik heb nog een aanrader koop of download via een torrent studio webdesign 5 pro (of 4 pro) dan kan je makkelijk een site maken hier een scrn:
studiowebdesign5.jpg
 
Uhm, nee ik heb de site zelf gemaakt en ontworpen... Maar anders maak ik alles gewoon weer opnieuw, we gaan er niet uitkomen he?
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan