1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
| * {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
font-size: 100%;
}
body {
font-family: "Times New Roman", Times, serif;
font-size: 100%;
width: 100%;
}
header, nav, section, article, aside, footer {
border: 1px solid black;
}
#page {
position: relative;
width: 100%;
height: auto;
}
#page, main {
display: -webkit-flex;
display: flex;
-webkit-flex-direction: column;
flex-direction: column;
justify-content: center;
}
header, nav, article, aside, footer {
padding: 1em;
}
header{
position: fixed;
min-height: 140px;
top: 0;
right: 0;
left: 0;
z-index:1;
background-color:yellow;
}
nav{
padding: 3px;
height: 35px;
}
main {
margin-top:140px;
}
section {
background-color: #FCF;
}
article {
height:1500px; /* pour faire défiler la page sans texte */
}
@media screen and (max-width: 959px) {
nav{
position: static;
}
article, aside {
width: 100%;
}
nav, footer {
order: 2;
}
}
@media screen and (min-width: 960px) {
#page,
#page > header,
#page > nav {
max-width:960px;
margin:0 auto;
}
header, nav, main, section, article, aside, footer {
text-align: center;
}
nav{
position: fixed;
top: 140px;
right: 0;
left: 0;
z-index:1;
background-color:blue;
}
main {
margin-top:175px;
}
section {
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row;
flex-direction: row;
}
aside, article {
margin: 1em;
}
article {
min-height:900px;
flex: 1 1 auto;
}
aside {
width: 25%;
height:auto;
max-height:300px;
}
} |
Partager