Code : Tout sélectionner
<div id="conteneur">
<div></div>
<div></div>
</div>Code : Tout sélectionner
#conteneur {
border: 1px solid;
overflow: hidden;
}
#conteneur div {
width: 50%;
float: left;
}Code : Tout sélectionner
#conteneur {
height: 1%;
}
Code : Tout sélectionner
#conteneur {
border: 1px solid blue;
overflow: hidden;
}
#conteneur #left {
width: 50%;
float: left;
height: 100px;
background-color:#f00;
}
#conteneur #right {
width: 50%;
float: left;
height: 100px;
background-color:#000;
} Code : Tout sélectionner
/* --- POSITIONNEMENT --- */
/* Page */
html, body {
height: 100%; /* Voir -> Note 1 ci-dessous */
}
body {
padding: 0;
}
#global {
min-height: 100%; /* -> 1 */
width: 780px;
overflow: hidden; /* -> 2 */
margin-left: auto;
margin-right: auto; /* -> 3 */
}
/* En-tête */
#entete {
padding: 15px 20px 10px 20px;
}
#entete h1 {
margin: 0;
}
#entete h1 img {
float: left;
margin: 7px 20px 10px 0;
}
#entete .sous-titre {
margin: 4px 0 15px 0;
}
/* Menu de navigation */
#navigation {
padding: 12px 15px;
}
#navigation ul {
margin: 0;
list-style: none;
text-align: center;
}
#navigation li {
display: inline;
}
#navigation a {
padding: 6px;
line-height: 1.5;
font-size: .9em;
text-decoration: none;
}
/* Contenu */
#contenu {
/*padding: 10px 20px; */
margin: 0px;
padding: 0;
}
#contenu > :first-child {
margin-top: 10px;
}
#contenu p, #contenu li {
line-height: 1.5;
}
/* Pied de page */
#pied {
padding: 15px 20px;
font-size: .85em;
}
#pied p {
margin: .5em 0;
}
#copyright {
text-align: left;
font-size: 1em;
}
/* --- mes CSS --------------------------------------/
#contenu {
overflow: hidden;
background-color:#999999;
}
#contenu #left {
width: 50%;
float: left;
background-color: #f00;
height: 300px;
}
#contenu #right {
width: 30%;
float: left;
background-color: #000;
height: 300px;
}
}
#entete h1 {
color:#fff;
}
Code : Tout sélectionner
/* --- POSITIONNEMENT --- */
/* Page */
html, body {
height: 100%; /* Voir -> Note 1 ci-dessous */
}
body {
padding: 0;
}
#global {
min-height: 100%; /* -> 1 */
width: 780px;
overflow: hidden; /* -> 2 */
margin-left: auto;
margin-right: auto; /* -> 3 */
}
/* En-tête */
#entete {
padding: 15px 20px 10px 20px;
}
#entete h1 {
margin: 0;
}
#entete h1 img {
float: left;
margin: 7px 20px 10px 0;
}
#entete .sous-titre {
margin: 4px 0 15px 0;
}
/* Menu de navigation */
#navigation {
padding: 12px 15px;
}
#navigation ul {
margin: 0;
list-style: none;
text-align: center;
}
#navigation li {
display: inline;
}
#navigation a {
padding: 6px;
line-height: 1.5;
font-size: .9em;
text-decoration: none;
}
/* Contenu */
#contenu {
padding: 10px 20px;
}
#contenu > :first-child {
margin-top: 10px;
}
#contenu p, #contenu li {
line-height: 1.5;
}
/* Pied de page */
#pied {
padding: 15px 20px;
font-size: .85em;
}
#pied p {
margin: .5em 0;
}
#copyright {
text-align: left;
font-size: 1em;
}
/* --- ajout CSS Marcgrenier--- */
#contenu {
overflow: hidden;
background-color:#999999;
}
#contenu #left {
width: 50%;
float: left;
background-color: #f00;
height: 300px;
}
#contenu #right {
width: 30%;
float: left;
background-color: #000;
height: 300px;
}
}
#entete h1 {
color:#fff;
}
Code : Tout sélectionner
#contenu > :first-child {
margin-top: 10px;
}