odin-default-css-exercises/flex/07-flex-layout-2/solution/solution.css

90 lines
1.1 KiB
CSS
Raw Normal View History

2021-08-24 15:59:06 +00:00
body {
2023-01-27 01:52:49 +00:00
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
margin: 0;
min-height: 100vh;
2021-08-24 15:59:06 +00:00
}
.header {
2023-01-27 01:52:49 +00:00
height: 72px;
background: darkmagenta;
color: white;
2021-08-24 15:59:06 +00:00
}
.footer {
2023-01-27 01:52:49 +00:00
height: 72px;
background: #eee;
color: darkmagenta;
2021-08-24 15:59:06 +00:00
}
.sidebar {
2023-01-27 01:52:49 +00:00
width: 300px;
background: royalblue;
2021-08-24 15:59:06 +00:00
}
.card {
2023-01-27 01:52:49 +00:00
border: 1px solid #eee;
box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.06);
border-radius: 4px;
2021-08-24 15:59:06 +00:00
}
/* SOLUTION */
body {
2023-01-27 01:52:49 +00:00
display: flex;
flex-direction: column;
2021-08-24 15:59:06 +00:00
}
.header {
2023-01-27 01:52:49 +00:00
display: flex;
align-items: center;
padding: 0 16px;
font-size: 32px;
font-weight: 900;
2021-08-24 15:59:06 +00:00
}
.body {
2023-01-27 01:52:49 +00:00
flex: 1;
display: flex;
2021-08-24 15:59:06 +00:00
}
.sidebar {
2023-01-27 01:52:49 +00:00
flex-shrink: 0;
box-sizing: border-box;
padding: 16px;
2021-08-24 15:59:06 +00:00
}
ul {
2023-01-27 01:52:49 +00:00
list-style-type: none;
margin: 0;
padding: 0;
2021-08-24 15:59:06 +00:00
}
li {
2023-01-27 01:52:49 +00:00
margin-bottom: 16px;
2021-08-24 15:59:06 +00:00
}
a {
2023-01-27 01:52:49 +00:00
color: white;
text-decoration: none;
font-size: 24px;
2021-08-24 15:59:06 +00:00
}
.container {
2023-01-27 01:52:49 +00:00
padding: 32px;
display: flex;
flex-wrap: wrap;
2021-08-24 15:59:06 +00:00
}
.card {
2023-01-27 01:52:49 +00:00
padding: 16px;
margin: 16px;
width: 300px;
2021-08-24 15:59:06 +00:00
}
.footer {
2023-01-27 01:52:49 +00:00
display: flex;
align-items: center;
justify-content: center;
}