Skip to content

Instantly share code, notes, and snippets.

@mothdotmonster
Last active July 2, 2024 11:37
Show Gist options
  • Save mothdotmonster/de8e95ccc7744d6aa1f389589b63969f to your computer and use it in GitHub Desktop.
Save mothdotmonster/de8e95ccc7744d6aa1f389589b63969f to your computer and use it in GitHub Desktop.
very basic code html+css code box
<body>
<div class="codeheader">code box demo</div>
<div class="codebox">
<pre><code>
code goes here
</code></pre>
</div>
</body>
.codebox {
color: black;
background-color: white;
padding: 10px;
font-size: 1em;
line-height: 1.3;
margin-bottom: 32px;
margin-left: auto;
margin-right: auto;
width: 80%;
border-width: thin;
border-style: solid;
box-shadow: 16px 16px grey;
}
.codeheader {
color: white;
background-color: black;
border-color: black;
padding: 10px;
font-size: 1.1em;
margin-left: auto;
margin-right: auto;
width: 80%;
border-width: thin;
border-style: solid;
text-align: left;
box-shadow: 16px 16px grey;
}
pre {
white-space: pre-wrap;
}
@VoltagedDebunked
Copy link

nice! love the design, but some more minimalism would work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment