Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

CSS in the head section of my Template causes error.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Apollo
Smarty n00b


Joined: 23 May 2003
Posts: 2
Location: South Germany

PostPosted: Fri May 23, 2003 11:27 pm    Post subject: CSS in the head section of my Template causes error. Reply with quote

Hello,
using linked CSS files works fine.
But having CSS information in the header of my HTML template
causes an error. Error message and CSS see below.

I need this, because I want to build up well formattet HTML code
for sending by Email (using fetch() to build the HTML string).
And here I can not use linked CSS files.

Help.
Juergen


=========
Fatal error: Smarty: [in Bill.html line 8]: syntax error: unrecognized tag: font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px.....


...
<style type="text/css">
<!--
html {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
table {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
-->
</style>
...
Back to top
View user's profile Send private message Send e-mail
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Sat May 24, 2003 1:39 am    Post subject: Reply with quote

FAQ.

http://www.phpinsider.com/smarty-forum/viewtopic.php?t=134
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sat May 24, 2003 3:47 am    Post subject: Reply with quote

It sounds / looks like you are running into the dreaded delimiter issue since both Smarty and JS and CSS have special meanings for { }. However, since Smarty runs first, it doesn't like the JS / CSS code. There are several ways to deal with this. This post outlines the situation..

HTH

I think I should make that post sticky.

update. Switched it so that the FAQ is now the sticky topic. It was more concise.
Back to top
View user's profile Send private message
Apollo
Smarty n00b


Joined: 23 May 2003
Posts: 2
Location: South Germany

PostPosted: Sat May 24, 2003 9:53 am    Post subject: Reply with quote

Cool! Works fine,
thanks
Juergen
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP