RE: [SMARTY] Including CSS
| From: | Andras Kende | Date: | Wed, 21 Apr 2004 16:48:55 +0000 |
| Subject: | RE: [SMARTY] Including CSS | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11287@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: SG [mailto:sg@fabled.net]
Sent: Wednesday, April 21, 2004 11:42 AM
To: smarty
Subject: [SMARTY] Including CSS
This seems basic, but how do you include a css stylesheet
in a smarty template? I have no trouble including inline styles
using {literal}{/literal}, but including <link rel="stylesheet" href=
"../css/style.css" type="text/css"> between the <head> tags does
nothing
even though
it works in a regular html page [ie, not one called via
$smarty->display()].
I've tried putting {literal} tags around the styles in the external
sheet (as well as not putting them), & importing the sheet via @ import
url or
including the file via {include file=""}, but nothing
goes. The docs indicate this is doable:
"The simplest thing is to avoid the situation altogether by separating
your
Javascript and CSS code into their own files and then using standard
HTML methods to access them. "
What am I missing? Does s/o have an example of a template that includes
a stylesheet that works? Are .conf files supposed to replace
css stylesheets? Thanks in advance,
s.
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
=------------------------------------------------------------
Hello,
I would try it without the ../ like:
<link rel="stylesheet" href="/css/style.css" type="text/css">
Here is mine:
http://cart.kende.com/products.php
http://cart.kende.com/templates/products.htm
:
<html>
<head>
<title> Product List </title>
<link href="/credit.css" rel="stylesheet" type="text/css">
</head>
<body>
Andras Kende
andras@kende.com