rainyday.dev/freecodcamp/build-a-doc-page/styles.css

95 lines
1.3 KiB
CSS
Raw Permalink Normal View History

html {
box-sizing: border-box;
font-size: 16px;
}
body {
margin: 0;
height: auto;
width: 100%;
background-color: #eee;
}
main {
margin-left: 24px;
position: relative;
width: 80%;
top: 12px;
left: 20%;
}
section {
padding-bottom: 16px;
margin-bottom: 16px;
border-bottom: 1px solid #bbb;
}
section:last-of-type {
border-bottom: none;
}
section:last-of-type header {
margin-bottom: 12px;
}
ul {
margin: 0;
}
header {
font-size: 1.25rem;
font-weight: bold;
}
#navbar {
height: 100%;
margin-right: 8px;
border-right: 1px solid #000;
position: fixed;
top: 0;
width: auto;
overflow: scroll;
}
#navbar header {
padding: 12px;
border-bottom: 1px solid #000;
}
#navbar div {
text-align: center;
padding: 8px;
border-bottom: 1px solid #000;
}
.nav-link {
color: #000;
text-decoration: none;
}
.nav-link:hover {
text-decoration: underline;
}
code {
background-color: #ddd;
padding: 2px;
}
@media(max-width: 1024px) {
#navbar {
position: relative;
width: auto;
height: 175px;
}
#navbar header {
position: sticky;
top: 0;
background-color: #eee;
}
main {
position: static;
}
}