Page 1 of 1
full screen background
Posted: Wed Oct 29, 2008 6:59 pm
by joostsoo
Hello,
I'm new in the CSS world and I'm struggeling with a problem.
I have a side build in First page and use a embedde stylesheet for a background on the whole page.
Now I want to do this in the example pages of CMS.
I copied a sjablon and worked on that.
But what ever I try I always get an error like this.
string(243) "Smarty error: [in preview:cmspreviewvD8Ytq line 50]: syntax error: unrecognized tag: background-image:url(/upload/images/achtergrond.jpg); background-repeat: no-repeat; background-position: top left; (Smarty_Compiler.class.php, line 446)" string(124) "Smarty error: [in preview:cmspreviewvD8Ytq line 50]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590).
I also tried, without succes, to create a style sheet for this.
So I hope someone can help me on the right track.
Thanks in advance
Regards Joost
Re: full screen background
Posted: Fri Oct 31, 2008 8:01 am
by Gregor
Could you paste the code?
It looks like you try to use a tag that is not known by cmsms, i.e. a type or so??
Gregor
Re: full screen background
Posted: Wed Nov 05, 2008 6:01 pm
by joostsoo
Hello Gregor,
Sorry for the late responce, I was off line a few days.
Her is a cut out of the code I try.
When I have this code in 1st page editor it works correct, in CMS it doesn´t.
I hope you can shed some light
here is the code
body{
background-image:url(/upload/images/achtergrond.jpg);
background-repeat: no-repeat;
background-position: top left;
}
I hope to hear from you,
Thanks so far,
Joost
Re: full screen background
Posted: Sun Nov 16, 2008 5:26 pm
by Gregor
I suggest you put the code into the to template according stylesheet.
Put a link to your site to see what happens.
Gregor
Re: full screen background
Posted: Sun Nov 16, 2008 5:39 pm
by Ziggywigged
Place this code in a stylesheet attached to your template.
Also, make sure your path is correct. Are you sure it's upload and not uploads.
body {
background: url(uploads/images/achtergrond.jpg) left top no-repeat;
}
Re: full screen background
Posted: Sun Nov 16, 2008 6:58 pm
by joostsoo
Hello,
Thanks for the update
Yes you are right about the path I missed an s there.
I will try your suggestion
Regards Joost
Re: full screen background
Posted: Mon Nov 24, 2008 11:04 pm
by Mantlet
Hi,
The way I understand your problem: You've build a site and pasted the whole design in a CMSMS Template? That means your styles are in the template.
What you need to do, is take out the stylesheet part, and put it in a Stylesheet file. Go to Layout -> Stylesheets and create a stylesheet and paste your code in there.
So remove this from the template:
Code: Select all
<style type="text/css">
body{
background-image:url(/upload/images/achtergrond.jpg);
background-repeat: no-repeat;
background-position: top left;
}
</style>
And place this part in the stylesheet:
Code: Select all
body{
background-image:url(/upload/images/achtergrond.jpg);
background-repeat: no-repeat;
background-position: top left;
}
The and codes can be left out. Click the CSS button to the right and link the CSS to your template.
Now the CSS is out of the template and smarty will no longer struggle with the '{}' signs in CSS.
Good luck
Re: full screen background
Posted: Mon Nov 24, 2008 11:04 pm
by Mantlet
Hi,
The way I understand your problem: You've build a site and pasted the whole design in a CMSMS Template? That means your styles are in the template.
What you need to do, is take out the stylesheet part, and put it in a Stylesheet file. Go to Layout -> Stylesheets and create a stylesheet and paste your code in there.
So remove this from the template:
Code: Select all
<style type="text/css">
body{
background-image:url(/upload/images/achtergrond.jpg);
background-repeat: no-repeat;
background-position: top left;
}
</style>
And place this part in the stylesheet:
Code: Select all
body{
background-image:url(/upload/images/achtergrond.jpg);
background-repeat: no-repeat;
background-position: top left;
}
The and codes can be left out. Click the CSS button to the right and link the CSS to your template.
Now the CSS is out of the template and smarty will no longer struggle with the '{}' signs in CSS.
Good luck