Archive for September, 2009

cleanscss

One common question amongst my students when it comes to their CSS is “How do you keep your code clean?” While there are numerous ways to keep your code clean and very readable, there are two sure fire ways to keep it nice and clean and readable.

Use Shorthand

Get rid of any unnecessary code that is cluttering up your code. Do you use margin-top, border-top, padding-top etc. on a daily basis?

More after the jump

dotted

Sick and tired of boring old underlines to show that a bit of text is a link? Here’s a really quick bit of CSS to show a dotted underline on your links (like this).

dotted-url

It’s so easy to do this that it hurts. We’re just swapping the underline for a border.

Dotted Underline on Hover Only a:link, a:visited { text-decoration: none; } a:hover { border-bottom: 1px dotted

More after the jump