je suis en train de modifier un pied de page collante (http://www.cssstickyfooter.com/) pour montrer une marge ... il est facile pour droite et à gauche avec une largeur: 90% et la marge: autoflottant marge css pied de page
| | | |
| | | |
| | | |
| | | |
mais comment pour obtenir la hauteur à 90% (ou de montrer une sorte de haut & marge bas) sans chambouler le pied flottant
| ____ |
| | | |
| |____| |
| |
grâce
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,
textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
#header {
height: 33px;
line-height: 33px;
text-align: center;
background-color: green;
}
html { height: 100%; }
body { height: 100%; width: 90%; margin: auto; }
#wrap { min-height: 100%; background-color:gray; }
#main {
overflow: auto;
padding-bottom: 33px; /* must be same height as the footer */
background-color: red;
height: 100%;
}
#footer {
position: relative;
margin-top: -33px; /* negative value of footer height */
height: 33px;
line-height: 33px;
text-align: center;
background-color:blue;
}
html {hauteur: 90%; marge supérieure: 5%; marge inférieure: 5%; } ne fonctionne pas !? le haut est bon mais le fond s'étire mal –
http://jsfiddle.net/F9HBc/ pourquoi est-il si difficile de centrer un div _stretching_ verticalement? il gère le redimensionnement horozontal bien (soit je suis stupide, un donné ... ou css est) –
http://www.jsfiddle.net/CrdEy/ basé sur http://www.infinitywebdesign.com/research/cssverticalcentereddiv.htm ne fonctionne toujours pas –