Hello
I'm having trouble to get a background image on my web page.
I use this code.
/*Stylesheet voor de website van DWL-international*/
#kop {
background : url(balkboven.jpg) no-repeat center center;
color : white;
width : 100%;
height : 100px;
}
h1 {
padding : 6px;
font-family : georgia;
font-size : 36px;
font-style : italic;
font-weight : bold;
}
h2 {
font-family : georgia;
font-size : 20px;
font-weight : bold;
text-align : right;
}
h3 {
font-family : arial;
font-size : 12px;
font-weight : bold;
}
#navigatie {
list-style : none;
left : 1%;
position : absolute;
top : 200px;
width : 40%;
font-family : arial;
font-size : 10px;
line-height :2.5em;
}
/*#gegevens {
left : 1%;
position : absolute;
top : 600px;
width : 40%;
font-family : arial;
font-size : 12px;
}*/
a:link {
font-weight : bold;
color : black;
text-decoration : none;
}
a:visited {
font-weight : bold;
color : #333;
text-decoration : none;
}
a:hover {
font-weight : bold;
color : #ccc;
text-decoration : none;
}
a:active {
font-weight : bold;
color : red;
text-decoration : none;
}
#inhoud {
color : blue;
top : 140px;
left : 20%;
width : 60%;
position : absolute;
font-family : arial;
font-size : 12px;
line-height : 1.5em;
margin : 0 0 0 2%;
}
#zijkant {
left : 80%;
padding : 0 1%;
position : absolute;
top : 230px;
width : 16%;
}
And when I look at the page I see a cupple of error messages. see below
string(246) "Smarty error: [in preview:cmspreviewdyJGRD line 14]: syntax error: unrecognized tag: background-image:url(/uploads/images/achtergrond.jpg); background-repeat: no-repeat; background-position: top left; (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewdyJGRD line 14]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
Hopefully someone can tell me what I'm doing wrong.
When I try this in a other html editor all shows up ok.
Thanks in advance
Regard Joost
Background not showing
Re: Background not showing
Not that this is going help much.
I have had issues with spaces in my CSS as well as smarty for example:
background : url(balkboven.jpg) no-repeat center center; //Won't Work
background: url(balkboven.jpg) no-repeat center center; //Will Work
Same thing as {smarty this= "that"} {smarty this="that"}
Shane
I have had issues with spaces in my CSS as well as smarty for example:
background : url(balkboven.jpg) no-repeat center center; //Won't Work
background: url(balkboven.jpg) no-repeat center center; //Will Work
Same thing as {smarty this= "that"} {smarty this="that"}
Shane
Last edited by sugna on Tue Nov 11, 2008 10:23 pm, edited 1 time in total.
Re: Background not showing
Ha Joost,
http://www.dwl-int.nl ziet er toch goed uit? Of moet de achtergrond elders op de pagina worden getoond?
Peter
http://www.dwl-int.nl ziet er toch goed uit? Of moet de achtergrond elders op de pagina worden getoond?
Peter
Re: Background not showing
If you're putting the style definitions inside the template (instead of in a db stylesheet or file) don't forget to surround the CSS code with {literal} {/literal} tags as described here.
Regards,
D
Regards,
D