It’s really okay, everyone does it. Why re-invent the wheel?
Justify it any way you like; very few people who use CSS hand-code every little element of their site. Even the most ‘virtuous’ of us tend to have a cupboard full of copy pasta that gets plunked down on a majority of the pages we build.
Additionally, grabbing an attractive piece of CSS from the web is a great way to learn how the pros do it. Sure, you can just drop it in, or hack away until it does what you need it to do, but there’s a decent chance that you’ll actually come out understanding a bit more than you did before.
Here’s a few of our favorite sites along those lines:
- Of course, W3schools will certainly provide the basics. Check out the “CSS Examples” page for a long list of basics. You won’t get blown away by the presentation, but the Try-It Editor is great for hacking away until you have the right combination of guesses.
- Dynamic Drive — great collection of both fundamentals and snazzy enhancements. In addition to good-looking and totally useful menus, forms, buttons, et cetera, the site offers many great layouts (both fixed and liquid, in full measure). Same content appears on CSS Dive, which makes us a little suspicious. Oh well, it’s still quite useful.
- Zen Garden — gives you a great idea of just how different content can look from one stylesheet to another. Find one you like, grab it, and see what you can make out of it.
- noupe.com/css — the breezy writing style gets a little grating after a while, but there are many useful articles to make up for the throwaway verbiage. Our favorite? “Using CSS To Do Anything”. Truly inspiring examples…but we immediately thought of 30 things that even they can’t get CSS to do. Maybe we’re being too literal.