diyhosting/style.css

230 lines
3.6 KiB
CSS
Raw Normal View History

2021-06-29 12:30:52 +00:00
/* Since this site is about teaching web concepts, even this file is a learning
* opportunity. */
body {
2021-10-10 22:15:00 +00:00
color: beige;
background: #111;
margin-bottom: 200px;
font-family: monospace;
2021-06-29 12:30:52 +00:00
}
h1 {
2021-10-10 22:15:00 +00:00
text-align: center;
color: lightgreen;
2021-06-29 12:30:52 +00:00
}
header h1 {
2021-10-10 22:15:00 +00:00
font-size: 40px;
2021-06-29 12:30:52 +00:00
}
h2 {
2021-10-10 22:15:00 +00:00
text-align: center;
color: deeppink;
2021-06-29 12:30:52 +00:00
font-variant: small-caps;
2021-10-10 22:15:00 +00:00
font-size: 24pt;
border-bottom: dashed #ddd 1px;
max-width: 500px;
margin: 1em auto;
2021-06-29 12:30:52 +00:00
}
h3 {
2021-10-10 22:15:00 +00:00
color: gold;
2021-06-29 12:30:52 +00:00
}
/* "a" is for links. */
a {
2021-10-10 22:15:00 +00:00
color: lightblue;
2021-06-29 12:30:52 +00:00
}
/* The "hover" option, which can be used with pretty much anything, allows you
* to set different settings if someone hovers over something with their mouse.
* */
a:hover {
2021-10-10 22:15:00 +00:00
color: white;
2021-06-29 12:30:52 +00:00
}
dt {
2021-10-10 22:15:00 +00:00
font-weight: bold;
2021-06-29 12:30:52 +00:00
}
/* code and pre are for formatting monospace text commands. Use code generally,
* but pre is for separate code blocks. pre is also sensitive to whitespace,
* unlike most of HTML. */
code {
2021-10-10 22:15:00 +00:00
color: lime;
border-radius: 5px;
2021-06-29 12:30:52 +00:00
}
pre {
2021-10-10 22:15:00 +00:00
background: #111222;
border: 1px solid lime;
border-radius: 20px;
padding: 1em;
2021-06-29 12:30:52 +00:00
white-space: pre-wrap;
2021-10-10 22:15:00 +00:00
overflow-wrap: break-word;
max-width: 600px;
margin: auto;
2021-06-29 12:30:52 +00:00
}
2021-10-10 22:15:00 +00:00
.wide { max-width: inherit; }
2021-06-30 20:02:27 +00:00
2021-08-15 17:48:59 +00:00
p img, li img, h1 img, h2 img, h3 img, h4 img, dt img {
2021-10-10 22:15:00 +00:00
vertical-align: middle;
2021-06-29 12:30:52 +00:00
max-width: 1em;
2021-06-30 21:34:27 +00:00
max-height: 1em;
2021-10-10 22:15:00 +00:00
border: none;
display: inline;
2021-06-29 12:30:52 +00:00
}
img {
2021-10-10 22:15:00 +00:00
max-width: 90%;
margin: auto;
display: block;
border: solid 5px beige;
2021-06-29 12:30:52 +00:00
}
2021-06-30 21:34:27 +00:00
.titleimg {
2021-10-10 22:15:00 +00:00
border: none;
height: 150px;
2021-06-30 21:34:27 +00:00
}
2021-06-29 12:30:52 +00:00
strong {
2021-10-10 22:15:00 +00:00
color: orange;
2021-06-29 12:30:52 +00:00
}
footer {
2021-10-10 22:15:00 +00:00
text-align: center;
font-variant: small-caps;
clear: both;
padding: 2em 0;
2021-06-29 12:30:52 +00:00
}
footer li {
2021-10-10 22:15:00 +00:00
display: inline-block;
padding: 0 .5em;
font-size: x-large;
2021-06-29 12:30:52 +00:00
}
footer li:hover {
2021-10-10 22:15:00 +00:00
background: lightblue;
2021-06-29 12:30:52 +00:00
}
2021-10-10 22:15:00 +00:00
nav { font-size: small;}
2021-06-29 12:30:52 +00:00
2021-10-10 22:15:00 +00:00
footer { font-size: large; }
2021-06-29 12:30:52 +00:00
nav ul, footer ul, #taglist {
padding: 0;
}
main {
2021-10-10 22:15:00 +00:00
margin: auto;
2021-06-29 12:30:52 +00:00
}
/* asides are used for minor tangential notes. I have them shrunk down in
* softer colors in a box with soft corners (border-radius). */
aside {
2021-10-10 22:15:00 +00:00
border: solid 1px black;
border-radius: 20px;
padding: 0 1em 0 1em;
font-size: small;
2021-06-29 12:30:52 +00:00
}
aside p {
2021-10-10 22:15:00 +00:00
color: gray;
2021-06-29 12:30:52 +00:00
}
aside code {
2021-10-10 22:15:00 +00:00
color: green;
2021-06-29 12:30:52 +00:00
}
/* .callout here is refencing any aside given the class name callout
* An example being: <aside class="callout"> */
aside.callout {
border: solid 1px orange;
}
2021-06-29 13:50:40 +00:00
.cnp {
2021-10-10 22:15:00 +00:00
width: 100%;
2021-06-29 13:50:40 +00:00
}
2021-06-29 12:30:52 +00:00
/* This "@media" block defines rules that will only be applied when the minimum
* width of the screen is 55em or greater. In essence, they are settings that
* only apply on normal weide screens, but *not* phones and low res monitors.
* Since we have more room on widescreens, we change a couple things. */
@media (min-width: 55em) {
aside {
margin: 0 30px 0 30px;
}
.resright, .disappear {
2021-10-10 22:15:00 +00:00
display: block;
2021-06-29 12:30:52 +00:00
float: right;
2021-10-10 22:15:00 +00:00
padding: 20px;
clear: both;
max-height: 400px;
max-width: 300px;
2021-06-29 12:30:52 +00:00
}
2021-10-10 22:15:00 +00:00
header { max-width: 900px; margin: auto;}
main { max-width: 850px; }
2021-06-29 12:30:52 +00:00
}
2021-08-15 17:48:59 +00:00
.ll {
2021-10-10 22:15:00 +00:00
font-size: large;
line-height: 1.3em;
2021-08-15 17:48:59 +00:00
max-width: 600px;
2021-10-10 22:15:00 +00:00
margin: auto;
2021-08-15 17:48:59 +00:00
}
.ll dd {
2021-10-10 22:15:00 +00:00
display: inline;
2021-08-15 17:48:59 +00:00
}
.ll dt {
2021-10-10 22:15:00 +00:00
display: inline-block;
width: 6em;
2021-08-15 17:48:59 +00:00
}
.ll dd:after {
display:block;
2021-10-10 22:15:00 +00:00
content: '';
2021-06-29 12:30:52 +00:00
}
2021-06-29 13:50:40 +00:00
/* The "Next Article" Button changes color and also has a 👉 automatically
* added to its front. */
@-webkit-keyframes next {
2021-10-10 22:15:00 +00:00
0% {color: yellow;}
2021-06-29 13:50:40 +00:00
100% {color: lightblue}
}
2021-08-15 17:48:59 +00:00
.prev {
2021-10-10 22:15:00 +00:00
font-size: large;
text-align: center;
margin: auto;
display: block;
font-weight: bold;
2021-08-15 17:48:59 +00:00
}
.prev:before {
2021-10-10 22:15:00 +00:00
content: "👈";
2021-08-15 17:48:59 +00:00
}
2021-06-29 13:50:40 +00:00
.next a {
2021-10-10 22:15:00 +00:00
color: inherit;
2021-06-29 13:50:40 +00:00
}
.next {
2021-10-10 22:15:00 +00:00
-webkit-animation:next 1s infinite alternate;
font-size: xx-large;
text-align: center;
margin: auto;
display: block;
font-weight: bold;
padding: 0 1em 1em 1em;
2021-06-29 13:50:40 +00:00
}
.next:before {
2021-10-10 22:15:00 +00:00
content: "👉";
2021-06-29 13:50:40 +00:00
}