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

Smarty & CSS

 
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 -> Language: French
View previous topic :: View next topic  
Author Message
Sweat
Smarty n00b


Joined: 02 Dec 2006
Posts: 4

PostPosted: Sat Dec 02, 2006 11:05 am    Post subject: Smarty & CSS Reply with quote

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 Smile
Back to top
View user's profile Send private message
ciboulette
Smarty Regular


Joined: 13 Jul 2006
Posts: 45

PostPosted: Sat Dec 02, 2006 6:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sweat
Smarty n00b


Joined: 02 Dec 2006
Posts: 4

PostPosted: Sat Dec 02, 2006 6:15 pm    Post subject: Reply with quote

En effet, cela fonctionne,

Merci Very Happy

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 Sad

Enfin bref, c'est résolu et c'est ce qui compte! Wink
Back to top
View user's profile Send private message
ciboulette
Smarty Regular


Joined: 13 Jul 2006
Posts: 45

PostPosted: Sat Dec 02, 2006 6:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
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 -> Language: French 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