<?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 - css</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>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>Un min-height pour tous les navigateurs</title>
    <link>http://www.code-web.org/post/2007/11/07/20-un-min-height-pour-tous-les-navigateurs</link>
    <guid isPermaLink="false">urn:md5:8f56feca30ee2cff8eaefd8255050df2</guid>
    <pubDate>Wed, 07 Nov 2007 15:58:00 +0000</pubDate>
    <dc:creator>Thierry Geindre</dc:creator>
        <category>Html / CSS</category>
        <category>css</category><category>html</category>    
    <description>&lt;p&gt;Parfois, certaines chartes graphiques requièrent que certains bloques d'une pages aient une hauteur minimale. Ce comportement peut être obtenu grâce à la propriété CSS min-height. Malheureusement, Internet Explorer ne reconnaît pas cette propriété... A cause de quoi, il faudra ruser pour obtenir le même comportement partout!&lt;/p&gt;    &lt;h3&gt;Cas général&lt;/h3&gt;


&lt;p&gt;Pour tous les navigateurs modernes et respectueux des standards, il est possible de préciser une hauteur minimale pour les éléments de type bloques. On utilisera pour cela la proprièté CSS min-height. De la façon suivante par exemple&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;css&quot;&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#monBloque&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;/* monBloque ne fera donc jamais moins de 50px de haut */&lt;/span&gt;
      min-height&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;50px&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;h3&gt;Le cas d'Internet Explorer&lt;/h3&gt;


&lt;p&gt;Comme je le disais plus haut, ce cher IE ne connaît pas la propriété min-height. Cependant, le comportement de IE pour un bloque dont le height (hauteur) est définit est le même que pour un min-height. Comprenez par là que IE agrandira un bloque si le contenu est trop grand, et ce même avec un height fixé. Nous allons pouvoir exploiter cette faiblesse!&lt;/p&gt;



&lt;h3&gt;La solution!&lt;/h3&gt;


&lt;p&gt;Nous allons devoir définir le height à une hauteur particulière pour IE, et le laisser en auto pour les autres navigateurs. Nous définirons également le min-height à cette valeur particulière, il sera ignoré par IE et correctement interprété par les autres navigateurs.&lt;/p&gt;



&lt;p&gt;En fin de compte, l'objectif est donc de définir une propriété supplémentaire pour IE, et seulement pour IE.&lt;/p&gt;



&lt;p&gt;Pour cela, il existe différentes solutions&amp;nbsp;:&lt;/p&gt;


&lt;h4&gt;Syntaxe CSS non comprise par IE&lt;/h4&gt;

&lt;pre class=&quot;css&quot;&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#monBloque&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;/* min-height pour tous, ligne ignorée par IE */&lt;/span&gt;
      min-height&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;50px&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;/* Height pour IE */&lt;/span&gt;
      height&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;50px&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;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;/* Syntaxe non comprise par IE, bloque ignoré */&lt;/span&gt;
html&amp;gt&lt;span style=&quot;color: #66cc66;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#monBloque&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;/* Seul IE ne tiendra pas compte de cette ligne*/&lt;/span&gt;
      height&lt;span style=&quot;color: #3333ff;&quot;&gt;:auto&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;h4&gt;Les commentaires conditionnels&lt;/h4&gt;


&lt;p&gt;Si vous ne souhaitez pas avoir de feuille CSS supplémentaire, oubliez cette solution. Cela-dit, il est parfois pratique d'avoir une seconde feuille CSS dans laquelle vous pourrez placer toutes les modifications ou ajouts de propriétés spécialement destinés à IE. Libre à vous de choisir.&lt;/p&gt;



&lt;p&gt;Nous allons exploiter ici ce que l'on appel les commentaires conditionnels. C'est un système proposé par Internet Explorer et permettant d'ajouter du code spécifiquement pour IE. Ce code sera considéré comme commentaire html par les autres navigateurs.&lt;/p&gt;



&lt;p&gt;La syntaxe à utiliser est la 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: #808080; font-style: italic;&quot;&gt;&amp;lt;!--[if IE]&amp;gt;&lt;/span&gt;
&lt;/span&gt;
   ..ici, code HTML réservé à IE...
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;&lt;/span&gt;!&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;endif&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;--&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;



&lt;p&gt;Je ne détaillerais pas plus la syntaxe de ces commentaires. Sachez cependant qu'il est possible de les préciser avec les version d'IE. Je vous laisse consulter &lt;a href=&quot;http://www.blog-and-blues.org/articles/Les_syntaxes_de_commentaires_conditionnels_pour_IE_Windows&quot; hreflang=&quot;fr&quot;&gt;l'article&lt;/a&gt; qui en parle en détail.&lt;/p&gt;



&lt;p&gt;Il nous est maintenant possible de spécifier une feuille CSS supplémentaire spécifiquement pour IE de la façon suivante&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: #808080; font-style: italic;&quot;&gt;&amp;lt;!-- debut de votre page --&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: #808080; font-style: italic;&quot;&gt;&amp;lt;!-- Ci dessous, votre feuille CSS normale --&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;link&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;rel&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;StyleSheet&amp;quot;&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: #000066;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;style.css /&amp;gt;&lt;/span&gt;
            &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;!--[if IE]&amp;gt;&lt;/span&gt;
                  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;!-- Et ici celle pour IE --&amp;gt;&lt;/span&gt;
                  &lt;span style=&quot;color: #009900;&quot;&gt;&amp;lt;link rel=&amp;quot;&lt;/span&gt;StyleSheet&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot; type=&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;css&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot; href=&amp;quot;&lt;/span&gt;style-ie.css &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;&lt;/span&gt;!&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;endif&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&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: #808080; font-style: italic;&quot;&gt;&amp;lt;!-- suite de votre page --&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;



&lt;p&gt;Ainsi dans style.css vous aurez les définition suivantes&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;css&quot;&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#monBloque&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
      min-height&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;50px&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;et dans style-ie.css&amp;nbsp;:&lt;/p&gt;

&lt;pre class=&quot;css&quot;&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#monBloque&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;/* Resta à auto pour les autres */&lt;/span&gt;
      height&lt;span style=&quot;color: #3333ff;&quot;&gt;:&lt;span style=&quot;color: #933;&quot;&gt;50px&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;h3&gt;Conclusion&lt;/h3&gt;


&lt;p&gt;Cette solution devrait également fonctionner pour width et min-width. À tester.&lt;/p&gt;



&lt;p&gt;J'espère que tout le monde aura vu dans cette article une raison de plus pour utiliser un navigateur respectueux des standards!&lt;/p&gt;</description>
    
    
    
          <comments>http://www.code-web.org/post/2007/11/07/20-un-min-height-pour-tous-les-navigateurs#comment-form</comments>
      <wfw:comment>http://www.code-web.org/post/2007/11/07/20-un-min-height-pour-tous-les-navigateurs#comment-form</wfw:comment>
      <wfw:commentRss>http://www.code-web.org/feed/rss2/comments/10</wfw:commentRss>
    						<h3>Abonnement aux commentaires</h3>
						<p>
							<a href="http://www.code-web.org/subscribetocomments?post_id=10">
								<!-- # 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>