«
Source Code
If you started the CSS Labs with layout,
then you're probably already familiar with my code-box class.
Let's have another look and explain it a bit more.
Hey, why not include the source code to the stylesheet so we can all see what's going on here? After all, a little recursion never hurt anyone. Okay, maybe a few stack overflows...
The box above is nothing more than a <div> with size and
border rules. Okay, and a pure white background to offset it from the rest
of the content around it. The white-space rule keeps things
nice and neat as you should expect from source code ala a text editor. As
you can see, I continue to declare CSS distances in terms of ems
so all my pages will remain elastic.
The little scissors icon in the top-right corner is just eye candy, and a visual reminder that you are free to cut and paste the source code on this site for your own use.
Bonus Lab — Font Sizes
Didn’t find what you were looking for? Try searching drx for many other helpful CSS resources.
Last updated: Monday, October 20th, 2008 @ 3:56 PM EDT [2008-10-20T19:56:35Z]
















































































