|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Sweat Smarty n00b
Joined: 02 Dec 2006 Posts: 4
|
Posted: Sat Dec 02, 2006 11:05 am Post subject: Smarty & CSS |
|
|
Bnojour à tous,
Je débute avec Smarty, néanmoins je recontre déjà un souci quand à l'utilisation du CSS avec Smarty:
Mon header.tpl:
Code: | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="MonRep/design/{$css}.css" />
{* Console de déboguage, décommenter pour l'activer *}
{*popup_init src="overlib.js"*}
</head>
<body> |
Mon fichier CSS:
Code: | body
{
font-family : Verdana ,"Bitstream Vera Sans";
font-size : 12px;
color : #666666;
}
a, a:visited
{
color : #1B60FF;
}
a:hover
{
color : #F8711F;
} |
Néanmoins la CSS n'est pas prise en compte sur la page, pourquoi?
Merci d'avance |
|
Back to top |
|
ciboulette Smarty Regular
Joined: 13 Jul 2006 Posts: 45
|
Posted: Sat Dec 02, 2006 6:12 pm Post subject: |
|
|
mauvais nom de fichier ou alors tu la pas placé dans le bon repertoire ce qui arrive souvent.
ta feuille css est apellé par le fichier php et pas par le template finalement je m'explique.
si ton site est comme ça :
Code: |
index.php
/templates/
/css/
/images/
|
tu devra appelé ton css comme ça
Code: | <link href="css/{$css}.css" rel="stylesheet" type="text/css">
|
|
|
Back to top |
|
Sweat Smarty n00b
Joined: 02 Dec 2006 Posts: 4
|
Posted: Sat Dec 02, 2006 6:15 pm Post subject: |
|
|
En effet, cela fonctionne,
Merci
P.S: Je ne comprend quand meme pas pourquoi quand je mets le chemin en entier à partir de la racine, que ça ne le prennes pas
Enfin bref, c'est résolu et c'est ce qui compte! |
|
Back to top |
|
ciboulette Smarty Regular
Joined: 13 Jul 2006 Posts: 45
|
Posted: Sat Dec 02, 2006 6:18 pm Post subject: |
|
|
Code: | <link rel="stylesheet" type="text/css" href="MonRep/design/{$css}.css" /> |
c'est pas la racine ça
a la limite ça c'est la racine
Code: | <link rel="stylesheet" type="text/css" href="/MonRep/design/{$css}.css" /> |
|
|
Back to top |
|
|
|
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
|