Devenet Devenet

Liens en vrac

Quelques 337 marque-pages glanés pendant ma navigation sur le Web.

25 résultats pour #css×

RSS ATOM

Note centrer une image dans un bloc

http://lehollandaisvolant.net/?mode=links&id=20150731185744

#container {
   max-height: 100%;
}

#container img {
   /* Keeps image from going outside the screen */
   max-height: 100%;
   max-width: 100%;
   /* Keeps image from beeing distorted */
   height: auto;
   width: auto;
   /* centering horizontally AND vertically */
   /* 50% of container */
   position: relative;
   top: 50%;
   left: 50%;
   /* 50% of image */
   transform: translate(-50%,-50%);
}

Responsive tables in pure CSS

http://lehollandaisvolant.net/?id=20150528170631

Comment transformer un tableau en un tableau responsive lisible sur des petits écrans

@media (max-width: 500px) {
/* table + tbody are blocks */
#mytable, #mytable tbody {
display: block;
width: 100%;
}

/* each row becomes table */
#mytable tr {
display: table;
margin-top: 20px;
width: 100%;
border-spacing: 5px 0;
}

/* each cell becomes a row (of the row that had become a table)  */
#mytable tr td {
display: table-row;
width: 100%;
}
}

Le guide complet pour centrer en CSS

http://putaindecode.fr/posts/css/le-guide-complet-pour-centrer-en-css/

Centrer en CSS, c’est la base, et parfois, ce n’est pas si simple. Ce guide liste les techniques les plus connues pour réaliser cet effet centré.