Raphaël Goetter
                          www.alsacreations.com
                          www.goetter.fr
                          www.ie7nomore.com
                          @goetter


Soyez révolutionnaires, utilisez CSS 2 !
et aussi...
                            Techniques CSS avancées
                            Positionnement avancé
                            (inline-block, modèle
                            tabulaire, modèle de boîte
                            flexible et autres
                            positionnements CSS3)
               depu         Gestion de projet
                    is le
               17 m         (conventions, optimisation
                    ars     des performances,
                            frameworks)
                            HTML5, CSS3
                            Résolution de bogues
                            Multimédia
                            (web mobile, e-mailing,
                            impression, projection,...)


   Soyez révolutionnaires, utilisez CSS 2 !
Au menu :
des aspects de CSS 2 ...
Finalisés depuis des années
Utilisables en production
Très pratiques à l'usage
… Souvent méconnus !
Soyez
révolutionnaire
 utilisez CSS 2 !
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
1996 ← CSS 1
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
1996 ← CSS 1
1997
1998 ← CSS 2.0
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
1996 ← CSS 1
1997
1998 ← CSS 2.0
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011 ← CSS 2.1
1996 ← CSS 1
1997
1998 ← CSS 2.0
1999
2000
2001             ← IE 6
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011 ← CSS 2.1
1996 ← CSS 1
1997
1998 ← CSS 2.0
1999
2000
2001             ← IE 6
2002
2003
2004
2005
2006             ← IE 7
2007
2008
2009
2010
2011 ← CSS 2.1
1996 ← CSS 1
1997
1998 ← CSS 2.0
1999
2000
2001             ← IE 6
2002
2003
2004
2005
2006             ← IE 7
2007
2008
2009             ← IE 8
2010
2011 ← CSS 2.1
1996 ← CSS 1
1997
1998 ← CSS 2.0
1999
2000
2001             ← IE 6
2002
2003
2004
2005
2006             ← IE 7
2007
2008
2009             ← IE 8
2010
2011 ← CSS 2.1   ← IE 9
Où est passé CSS 2 ?
Un monde sans IE 6 ?!
Un monde sans IE6 ?




Nos successeurs
ne connaîtront pas IE6 !
Un monde sans IE6 : où en est-on ?




   ←

                       98%
Un monde sans IE6 : minima et maxima




     min-width
     max-width
     min-height
     max-height
body { max-width: 1100px; }
Démo !
Un monde sans IE6 : minima et maxima
Un monde sans IE6 : minima et maxima
Un monde sans IE6 : first-child et :hover




pseudo-classes
  first-child
    :hover

p:hover { background-color: pink; }
Démo !
Un monde sans IE6 : first-child et :hover
Un monde sans IE6 : first-child et :hover
Un monde sans IE6 : enfants A > B




           sélecteur
           d’enfants
              A>B

ul#nav > li { list-style: none; }
Démo !
Un monde sans IE6 : enfants A > B
Un monde sans IE6 : attribut [attr]




         sélecteur
         d’attribut
           [attr]

input[type="submit"] { cursor: pointer; }
Démo !
Un monde sans IE6 : attribut [attr]
Un monde sans IE6 : adjacent A + B




       sélecteur
      d’adjacence
         A+B

h1 + p { font-style: italic; }
Démo !
Un monde sans IE6 : adjacent A + B
Un monde sans IE6 : position fixée




positionnement
position: fixed;


 #nav { position: fixed; top: 0; left: 0;}
Démo !
Un monde sans IE6 : position fixée
Un monde sans IE 7 ?!
Un monde sans IE7: où en est-on ?




        ←



  ←

                      91%
Un monde sans IE7 : :before et :after




contenu généré
    :before
     :after

blockquote:after { content: url(guillemets.png); }
Démo !
Un monde sans IE7 : :before et :after
Un monde sans IE7 : :before et :after
Un monde sans IE7 : inline-block




inline et block à
     la fois
  inline-block

a { display: inline-block; width: 150px; }
Démo !
Un monde sans IE7 : inline-block
Un monde sans IE7 : modèle tabulaire




    modèle
   tabulaire
 display: table

#aside, #content { display: table-cell; }
Démo !
Un monde sans IE7 : modèle tabulaire
Un monde sans IE7 : modèle tabulaire



Mise en page facile et intuitive
Hauteurs égales
Centrage vertical
Largeur fluide
Hauteur fluide
Réordonnement d’éléments
Un monde sans IE7 : modèle tabulaire
Un monde sans IE7 : modèle tabulaire
« pas facile
d’avoir du style »
 © internet explorer
Crédits




Photos, illustrations :
www.fotolia.fr
Police :
MegalopolisExtra
by SMeltery
Icones et pictos :
www.iconfider.net


Raphaël Goetter   alsacreations.com   @goetter
Merci !




Raphaël Goetter   alsacreations.com

Soyez revolutionnaire, utilisez CSS2 !