<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.code-web.org/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>Code-Web.org - design</title>
  <link>http://www.code-web.org/</link>
  <description>Développement Web en toute liberté!</description>
  <language>fr</language>
  <pubDate>Thu, 21 Aug 2008 18:05:39 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>(Encore) Une nouvelle charte</title>
    <link>http://www.code-web.org/post/2008/03/26/Encore-Une-nouvelle-charte</link>
    <guid isPermaLink="false">urn:md5:19a8723e76d6ca564a69eb1a121dc89c</guid>
    <pubDate>Wed, 26 Mar 2008 18:39:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Code-Web.org</category>
        <category>code-web.org</category><category>design</category>    
    <description>    &lt;p&gt;Code-Web.org fait une nouvelle fois peau neuve. Cette fois-ci c'est propre et clair. Par ailleurs, le site ne change pas seulement sur la forme, mais aussi dans le moteur qui le fait fonctionner. En effet, il est passé sous Dotclear 2 Beta 7, version très prometteuse du soft que je recommande à tout les bloggeurs désireux de tester quelques solutions.&lt;/p&gt;


&lt;p&gt;La coloration syntaxique des code source n'est plus, et pour cause, le plugin qui s'en chargeait n'est actuellement pas disponible pour Dotclear 2. Cela-dit, on peut espérer qu'il sera porté à l'avenir sur cette version ou qu'un autre viendra le remplacer. J'envisage également de le créer moi même, après tout j'aimerais bien apporter ma modeste contribution à cette communauté.&lt;/p&gt;


&lt;p&gt;Enfin, vous avez peut-être remarqué la petite publicité qui se cache en bas de la partie droite du site. Je vous conseille de visiter le site qui offre ce service, j'ai nommé &lt;a href=&quot;http://www.blogbang.com/home&quot; hreflang=&quot;fr&quot;&gt;Blogbang.com&lt;/a&gt;. Le concept est sympa et prometteur.&lt;/p&gt;


&lt;p&gt;Bon allez, je retourne aux rédactions de contenus sérieux.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/03/26/Encore-Une-nouvelle-charte#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/03/26/Encore-Une-nouvelle-charte#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/38</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=38">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Un arrière plan étirable</title>
    <link>http://www.code-web.org/post/2008/02/15/46-un-arriere-plan-etirable</link>
    <guid isPermaLink="false">urn:md5:e08ac15a9942168906ef3e4c52c74dcc</guid>
    <pubDate>Fri, 15 Feb 2008 22:32:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Html / CSS</category>
        <category>design</category><category>html</category>    
    <description>&lt;p&gt;Les propriétés CSS permettant d'appliquer une image d'arrière plan aux éléments d'une page, ou à la page elle même, ne permettent de couvrir toute la surface disponible que par répétition de l'image. Je vous propose ici une méthode permettant détirer l'image en hauteur et/ou en largeur en fonction de l'espace disponible. A noter qu'à l'inverse de beaucoup de solutions proposées sur la toile, celle que je vous propose n'utilise pas de java script.&lt;/p&gt;    &lt;h3&gt;Le principe&lt;/h3&gt;


&lt;p&gt;Les propriétés CSS ne satisfaisant pas nos exigences, nous allons devoir utiliser une autre technique. Pour cela, nous utiliserons une classique image (balise &amp;lt;img ... /&amp;gt;). La méthode consistera en fait à lui donner des dimensions à 100%. Elle s'étirera donc automatiquement en fonction des éventuels changements de dimensions.&lt;/p&gt;


&lt;p&gt;Puisqu'il s'agit d'un arrière plan, nous allons devoir placer du contenu par dessus. Pour cela, nous allons devoir modifier le mode de positionnement de ce contenu en fonction du contexte.&lt;/p&gt;


&lt;h3&gt;L'arrière plan d'une page&lt;/h3&gt;

&lt;p&gt;Pour cela nous allons d'abord supprimer les éventuelles marges du corps de la page. Nous lui donnerons également des dimensions à 100% sans quoi cette astuce ne fonctionnera pas sous certaines versions d'Internet Explorer.&lt;/p&gt;


&lt;p&gt;Nous placerons ensuite note image de fond dans la première ligne de contenu de l'élément &amp;lt;body&amp;gt;. Les dimensions de cette images seront définies à 100%.&lt;/p&gt;


&lt;p&gt;Enfin, pour que le contenu se place par dessus cette image, on pourra le placer dans un élément de type &amp;lt;div&amp;gt; (ou tout autre conteneur) que nous positionnerons en absolute.&lt;/p&gt;

&lt;pre class=&quot;html&quot;&gt;&lt;span style=&quot;color: #00bbdd;&quot;&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Strict//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&amp;quot;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;html&lt;/span&gt; xmlns&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt; xml:&lt;span style=&quot;color: #000066;&quot;&gt;lang&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;fr&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;lang&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;fr&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
 &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/span&gt;
 &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;/span&gt;Un exemple&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;
 &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;http-equiv&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Content-Type&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;text/html; charset=iso-8859-1&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;style&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&amp;nbsp;
   body,html
   {
     /* Indispensables pour certain navigateurs */
     width:100%;
     height:100%;
     /* On retire les marges éventuelles */
     margin:0;
     padding:0;
    }
&amp;nbsp;
    #background
    {
     width:100%;
     height:100%;
    }
&amp;nbsp;
    #content
    {
     position:absolute;
     left:0;
     top:0;
    }
  &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/span&gt;
 &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;
 &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;images/background.png&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;background&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;content&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
     &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;/span&gt;Le contenu de la page se place dans ce div!&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;
 &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Vous pouvez vérifier le bon fonctionnement de cette astuce grâce à &lt;a href=&quot;http://exemples.code-web.org/arriere-plan-etirable/&quot; hreflang=&quot;fr&quot;&gt;l'aperçu&lt;/a&gt; que je vous propose. Redimensionnez la fenêtre et observez l'image prendre les bonnes dimensions. Vous remarquerez en passant que les proportions de l'image ne sont pas forcément respectées. Si vous souhaitez conserver les bonnes proportions, il vous suffira de ne préciser la dimension 100% que pour la hauteur ou la largeur de l'image.&lt;/p&gt;


&lt;p&gt;Vous remarquerez peut être que cette page n'est pas valide. En effet, une balise &amp;lt;img ... /&amp;gt; ne peut normalement pas apparaître dans ce contexte, il faudrait logiquement qu'elle soit placé entre des éléments &amp;lt;h1&amp;gt; ou &amp;lt;p&amp;gt; par exemple. Cependant, en plus d'être impossible à justifier à cette endroit, l'utilisation de ces balises ne permet pas d'obtenir le comportement attendu sur certain navigateurs.&lt;/p&gt;


&lt;p&gt;Remarquez enfin que nous avons laissé le texte alternatif de l'image vide. Ceci s'explique simplement&amp;nbsp;: aucun texte alternatif n'aurait de sens à cette endroit. De plus, si pour une raison ou une autre il apparaissait, il pourrait nuire à la bonne lecture de la page par le visiteur (superposition de texte).&lt;/p&gt;


&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;Il est probablement préférable d'utiliser cette astuce avec modération. Je n'ai pas eu l'occasion de la tester sur beaucoup de navigateurs. &lt;a href=&quot;http://www.alsacreations.com/&quot; hreflang=&quot;fr&quot;&gt;Alsacreations&lt;/a&gt; nous indique que cette technique fonctionne sur les navigateurs suivant&amp;nbsp;: &lt;em&gt;sur Windows IE5, IE5.5, IE6, Mozilla Firebird 0.7, Mozilla Firefox 0.8 et Opera 7.23&lt;/em&gt;. Pour ma part, j'ai pu vérifier avec les versions Linux de Firefox 2.0 et Opera.&lt;/p&gt;



&lt;p&gt;Vous pourrez également appliquer cette méthode à d'autre éléments de votre page. La technique restant rigoureusement la même.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/02/15/46-un-arriere-plan-etirable#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/02/15/46-un-arriere-plan-etirable#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/31</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=31">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Trouver les bonnes couleurs</title>
    <link>http://www.code-web.org/post/2008/02/04/45-trouver-les-bonnes-couleurs</link>
    <guid isPermaLink="false">urn:md5:89270f39d868e6a2e4b3d57678f805e4</guid>
    <pubDate>Mon, 04 Feb 2008 13:46:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Web Design</category>
        <category>design</category><category>kit graphique</category><category>ressources</category>    
    <description>    &lt;p&gt;L'une des étapes de la production d'une charte graphique, et non des moindres, est le choix des couleurs qui seront utilisés. Une première couleur pourra assez facilement être déterminée en fonction du thème abordé ou selon les goûts et les couleurs du designer. Cependant, il n'est pas toujours aisé de trouver les couleur qui se marieront bien avec la première.&lt;/p&gt;


&lt;p&gt;Heureusement, il existe sur la toile des outils destinés à faciliter cette tâche. Parmi les meilleurs, on citera &lt;a href=&quot;http://www.colormatch.dk/&quot; hreflang=&quot;en&quot;&gt;colormatch.dk&lt;/a&gt; mais il existe d'autres. Une recherche sur le web vous en donnera la liste. A noter que ce genre d'outils n'est pas exclusivement destiné au Web Design, il pourrait très bien être employé pour le choix des couleurs de votre future salon par exemple.&lt;/p&gt;


&lt;p&gt;A propos des couleurs, citons un dernier site, &lt;a href=&quot;http://www.pourpre.com/&quot; hreflang=&quot;fr&quot;&gt;pourpre.com&lt;/a&gt; où vous pourrez trouver bon nombre d'informations à propos des couleurs et notamment de bons moyens pour calibrer correctement votre écran.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/02/04/45-trouver-les-bonnes-couleurs#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/02/04/45-trouver-les-bonnes-couleurs#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/30</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=30">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Nouvelle charte graphique pour Code-Web.org</title>
    <link>http://www.code-web.org/post/2008/01/28/44-la-prochaine-charte-de-code-weborg-bluenight-deja-telechargeable</link>
    <guid isPermaLink="false">urn:md5:48c05b6eadc27f46609a02be372a1afc</guid>
    <pubDate>Mon, 28 Jan 2008 09:52:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Web Design</category>
        <category>code-web.org</category><category>design</category>    
    <description>    &lt;p&gt;Code-Web.org fait peau neuve avec cette nouvelle charte graphique nommée BlueNight. Pour l'heure, elle a été testée sous les navigateur suivant&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mozilla Firefox 2.0&lt;/li&gt;
&lt;li&gt;Opera 9.24&lt;/li&gt;
&lt;li&gt;Konqueror 3.5&lt;/li&gt;
&lt;li&gt;Dillo 0.8&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quelques bug subsiste sous Internet Explorer 6. Sous la version 7, on observe des marges un peut trop grandes au niveau des formulaires. Ces problèmes seront réglés sous peu.&lt;/p&gt;


&lt;p&gt;Comme pour la précédente charte, vous pouvez &lt;a href=&quot;http://www.code-web.org/template/BlueNight/sources/&quot; hreflang=&quot;fr&quot;&gt;télécharger BlueNight&lt;/a&gt; ou simplement en avoir un &lt;a href=&quot;http://www.code-web.org/template/BlueNight/web/&quot; hreflang=&quot;fr&quot;&gt;aperçu&lt;/a&gt; dans un autre contexte.&lt;/p&gt;


&lt;p&gt;&lt;em&gt;La production de cette charte graphique a demandé un certain temps de travail. Elle vous est gracieusement offerte. La seule contrepartie demandée aux utilisateurs de cette charte, sans pour autant être obligatoire, est de laisser le lien vers Code-Web.org déjà présent dans la charte.&lt;/em&gt;&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2008/01/28/44-la-prochaine-charte-de-code-weborg-bluenight-deja-telechargeable#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2008/01/28/44-la-prochaine-charte-de-code-weborg-bluenight-deja-telechargeable#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/29</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=29">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Centrage vertical et horizontal</title>
    <link>http://www.code-web.org/post/2007/11/22/29-centrage-vertical-et-horizontal</link>
    <guid isPermaLink="false">urn:md5:e7824d69f287826bb0003cf24e8d2a05</guid>
    <pubDate>Thu, 22 Nov 2007 17:09:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Html / CSS</category>
        <category>design</category><category>html</category>    
    <description>&lt;p&gt;S'il est simple de centrer horizontalement un bloque dans une page, il moins simple de le centrer verticalement. Nous verrons dans cette article une technique qui fonctionne uniquement grâce aux CSS et sur tous les navigateurs. Le tout en respectant les normes!&lt;/p&gt;    &lt;h3&gt;Le code HTML&lt;/h3&gt;

&lt;p&gt;Il est on ne peut plus simple&amp;nbsp;:&lt;/p&gt;
&lt;pre class=&quot;html&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;centre&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
   &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;/span&gt;Je suis un bloque toujours centr&lt;span style=&quot;color: #ddbb00;&quot;&gt;&amp;amp;eacute;&lt;/span&gt;! Essayez de redimensionner la fen&lt;span style=&quot;color: #ddbb00;&quot;&gt;&amp;amp;ecirc;&lt;/span&gt;tre!&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Rien de très compliqué, un simple bloque contenant un peu de texte.&lt;/p&gt;


&lt;h3&gt;Le code CSS&lt;/h3&gt;

&lt;p&gt;On commence d'abord avec un hack pour Internet Explorer, rien de bien surprenant finalement.&lt;/p&gt;
&lt;pre class=&quot;css&quot;&gt;html, body
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
   height&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;100&lt;/span&gt;&lt;/span&gt;%&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Ensuite nous allons pouvoir modifier l'apparence du bloque que nous avons créé plus haut&amp;nbsp;:&lt;/p&gt;
&lt;pre class=&quot;css&quot;&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#centre&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On lui donne des dimensions */&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;200px&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;200px&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On centre le texte qu'il contient*/&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;text-align&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;center&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Une petite bordure noire */&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;1px&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;solid&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#&lt;span style=&quot;color: #933;&quot;&gt;000&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Une couleur de fond bleue */&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#5fa3ff&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Et enfin du texte en blanc */&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#fff&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Rien de très utile finalement puisque notre bloque restera toujours placé en haut et à gauche de la page avec ce seul code CSS. Nous allons donc devoir y ajouter quelques propriétés.&lt;/p&gt;


&lt;p&gt;Premièrement nous définirons sont positionnement à absolute, car il est ensuite possible d'utiliser les propriétés left et top avec comme valeurs 50%. Cependant, même après cela, notre bloque ne sera pas vraiment centré. En effet, seul le coin supérieur gauche du bloque sera centré sur la page. Pour remédier à cela, nous allons utiliser des marges négatives qui feront &quot;reculer&quot; le bloque de la moitié de sa hauteur et de sa largeur. Il sera ainsi parfaitement centré horizontalement et verticalement.&lt;/p&gt;


&lt;p&gt;Ce qui nous donnera donc le code CSS suivant&amp;nbsp;:&lt;/p&gt;
&lt;pre class=&quot;css&quot;&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#centre&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Positionnement absolu */&lt;/span&gt;
   position&lt;span style=&quot;color: #3333ff;&quot;&gt;:absolute&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Positionnement du coin supérieur gauche au centre */&lt;/span&gt;
   left&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;50&lt;/span&gt;&lt;/span&gt;%&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   top&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;50&lt;/span&gt;&lt;/span&gt;%&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On donne des dimensions au bloque */&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;200px&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;200px&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On le fait &amp;quot;reculer&amp;quot; la la moitié de ces dimensions */&lt;/span&gt;
   margin-left&lt;span style=&quot;color: #3333ff;&quot;&gt;:-&lt;span style=&quot;color: #933;&quot;&gt;100px&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   margin-top&lt;span style=&quot;color: #3333ff;&quot;&gt;:-&lt;span style=&quot;color: #933;&quot;&gt;100px&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
   &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Les mises en formes */&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;text-align&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;center&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;1px&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;solid&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#&lt;span style=&quot;color: #933;&quot;&gt;000&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#5fa3ff&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#fff&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Et le tour est joué&amp;nbsp;: vous obtiendrez un bloque parfaitement centré.&lt;/p&gt;


&lt;p&gt;Un petit mot sur la technique consistant à utiliser un tableau de hauteur 100% pour le centrage vertical&amp;nbsp;: bannissez la! Ce n'est absolument pas la place d'un tableau.&lt;/p&gt;


&lt;p&gt;Nous allons terminer cette article sur un &lt;a href=&quot;http://exemples.code-web.org/centrage-vertical-horizontal/&quot; hreflang=&quot;fr&quot;&gt;exemple d'utilisation&lt;/a&gt; de cette technique. Je vous invite d'ailleurs à redimensionner votre fenêtre pour admirer le centrage automatique.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2007/11/22/29-centrage-vertical-et-horizontal#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2007/11/22/29-centrage-vertical-et-horizontal#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/15</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=15">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Effet encadrement photo avec ombre sur vos images</title>
    <link>http://www.code-web.org/post/2007/11/15/26-effet-encadrement-photo-avec-ombre-sur-vos-images</link>
    <guid isPermaLink="false">urn:md5:55930791ef90c125f2b750cde8367ea6</guid>
    <pubDate>Thu, 15 Nov 2007 10:56:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Html / CSS</category>
        <category>css</category><category>design</category><category>html</category>    
    <description>&lt;p&gt;Je vous propose de découvrir dans cet article comment donner à vos images un encadrement blanc, un contour gris et enfin une ombre. L'objectif est de leur donner l'apparence d'une photo papier surélevée par rapport à votre page. La technique qui sera présenté ici ne nécessitera aucune modification de vos images, et pourra donc s'appliquer à n'importe laquelle de façon automatique.&lt;/p&gt;    &lt;p&gt;Notre objectif est de créer un système qui mettra en place, sur vos images, le cadre et l'ombre sans modifier l'image originale. Nous n'utiliserons ici que du CSS et une image.&lt;/p&gt;


&lt;h3&gt;Le principe&lt;/h3&gt;


&lt;p&gt;Il est possible d'afficher une image dans un bloque. On peut donc très facilement appliquer à ce bloque une marge interne (padding) de plusieurs pixels. Ceci créer une première bordure de la couleur de fond de notre bloque. Nous pouvons alors exploiter la propriété CSS border pour ajouter une seconde bordure d'un pixel de large et grise par exemple. Il ne nous manquera alors plus que l'ombre.&lt;/p&gt;



&lt;p&gt;Impossible en CSS de générer une ombre. C'est pourquoi nous allons simplement utiliser une image en PNG. C'est le seul format adapté au web qui gère très bien la couche alpha (transparence). Cette image nous fournira une ombre à droite et en bas (à adapter pour des ombres orientés différemment). Finalement, on essaiera simplement de fusionner deux images.&lt;/p&gt;


&lt;p&gt;Une image quelconque&amp;nbsp;:&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://www.code-web.org/exemples/effet-encadrement-photo-ombre/images/image.png&quot; alt=&quot;Image de test&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Et l'image qui nous fournit l'ombre&amp;nbsp;:&lt;/p&gt;



&lt;p&gt;&lt;img src=&quot;http://www.code-web.org/exemples/effet-encadrement-photo-ombre/images/shadowAlpha-mini.png&quot; alt=&quot;Ombre&quot; /&gt;&lt;/p&gt;


&lt;h3&gt;Mise en œuvre&lt;/h3&gt;



&lt;p&gt;Pour que les images puissent se superposer, l'une d'entre elles doit être placée en arrière plan d'un bloque. Nous exploiterons l'arrière plan du bloque de l'image (pour obtenir une bordure blanche). Nous devrons donc placer autour de l'image un autre bloque chargé de contenir l'ombre. Nous utiliserons alors le code html suivant&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;html&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;span&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;shadowImage&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;montagnes.png&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;montagnes&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;



&lt;p&gt;Le span encadrant l'image n'a pas d'autre but que de créer le second bloque dont nous aurons besoin pour placer l'image générant l'ombre en arrière plan. Dans notre fichier CSS, on utilisera le code suivant&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;css&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.shadowImage&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On met notre span en bloque */&lt;/span&gt;
  display&lt;span style=&quot;color: #3333ff;&quot;&gt;:block&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On lui applique un float left, il sort ainsi du flux standard
  et n'occupera pas toute la largeur disponible comme il l'aurait
  fait normalement */&lt;/span&gt;
  float&lt;span style=&quot;color: #3333ff;&quot;&gt;:left&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On place notre ombre en arrière plan en bas à droite */&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'images/shadowAlpha-mini.png'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;no-repeat&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;bottom&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;right&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Quelques marges pour le style... */&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;margin&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;10px&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;10px&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #6666ff;&quot;&gt;.shadowImage&lt;/span&gt; img
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On fixe notre image en format bloque */&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;block&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* On définit sa position à relative pour plus de liberté */&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;relative&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Son fond est blanc pour obtenir une bordure de cette couleur*/&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#fff&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Une autre bordure */&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;1px&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;solid&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#a9a9a9&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Les marges positives servent à aficher les ombres,
     les marges négative sortent l'image de son coteneur */&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;margin&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; -&lt;span style=&quot;color: #933;&quot;&gt;6px&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;6px&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;6px&lt;/span&gt; -&lt;span style=&quot;color: #933;&quot;&gt;6px&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
  &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Marge interne pour la bordure blanche */&lt;/span&gt;
  &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;padding&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;4px&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Notez qu'il faudra utiliser une &lt;a href=&quot;http://www.code-web.org/exemples/effet-encadrement-photo-ombre/images/shadowAlpha.png&quot; hreflang=&quot;fr&quot;&gt;image assez grande&lt;/a&gt; pour produire une ombre sur des images de plus grande taille. Vous pouvez maintenant admirer le &lt;a href=&quot;http://exemples.code-web.org/effet-encadrement-photo-ombre/&quot; hreflang=&quot;fr&quot;&gt;résultat&lt;/a&gt;.&lt;/p&gt;


&lt;h3&gt;Conclusion&lt;/h3&gt;


&lt;p&gt;Le seul problème que pose vraiment la méthode utilisée, c'est qu'il est impératif d'ajouter un conteneur supplémentaire à l'image. L'article dont je me suis inspiré pour ma rédaction proposait de l'encadrer d'un div. Je pense que pour respecter la valeur sémantique des éléments de la page, il est préférable d'utiliser le span. D'autre part, si vous utilisez cet effet sur une image encadrée par un lien, vous pouvez utiliser ce lien comme conteneur supplémentaire.&lt;/p&gt;


&lt;h5&gt;Sources&lt;/h5&gt;

&lt;p&gt;Cet article est inspiré d'un &lt;a href=&quot;http://www.alistapart.com/articles/cssdropshadows&quot; hreflang=&quot;en&quot;&gt;article&lt;/a&gt; sur &lt;a href=&quot;http://www.alistapart.com/&quot; hreflang=&quot;en&quot;&gt;alistapart.com&lt;/a&gt;. Si l'anglais ne vous pose pas de problème, je vous invite à le lire pour plus de détails sur la méthode utilisée.&lt;/p&gt;


&lt;p&gt;Je profite de l'occasion pour signaler l'existence du site &lt;a href=&quot;http://www.freemages.fr/&quot; hreflang=&quot;fr&quot;&gt;freemages.fr&lt;/a&gt; qui propose des tonnes d'images sous Licence Art Libre. C'est de là que vient la photo de montagnes utilisée en exemple dans cet article.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2007/11/15/26-effet-encadrement-photo-avec-ombre-sur-vos-images#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2007/11/15/26-effet-encadrement-photo-avec-ombre-sur-vos-images#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/13</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=13">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
  <item>
    <title>Télécharger la charte de CodeWeb!</title>
    <link>http://www.code-web.org/post/2007/11/11/22-telecharger-la-charte-de-codeweb</link>
    <guid isPermaLink="false">urn:md5:7f6205800e3c8a02745f4ed8b99eaafe</guid>
    <pubDate>Sun, 11 Nov 2007 00:14:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Web Design</category>
        <category>design</category><category>kit graphique</category>    
    <description>    &lt;p&gt;Afin de marquer une bonne fois pour toute l'esprit de liberté de réutilisation du contenu de ce site, je vous propose ici de télécharger la charte graphique de CodeWeb pour la réutiliser comme bon vous semble. Naturellement, il serait grandement apprécié que codeweb.free.fr soit cité comme auteur de la charte graphique dans vos réalisations!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://code-web.org/template/RedSnow/web/&quot; hreflang=&quot;fr&quot;&gt;Aperçu de la charte&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code-web.org/template/RedSnow/sources/&quot; hreflang=&quot;fr&quot;&gt;Téléchargement&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cette charte respecte la norme XHTML 1.0 Strict et a été testée sur de nombreux navigateurs avec succès.&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2007/11/11/22-telecharger-la-charte-de-codeweb#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2007/11/11/22-telecharger-la-charte-de-codeweb#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/7</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=7">
								<!-- # If the subscriber is logged in -->
																<!-- # If the subscriber is not logged in -->
																	S'abonner pour recevoir les commentaires suivants par email															</a>
						</p>
					  </item>
    
</channel>
</rss>