Category Archives: CSS

Cascading style sheets, the code that makes web pages pretty (or not.)

Foo Hack 4.0

Partly because I haven’t been writing much CSS these days, and partly because it’s been just over a year since the last redesign, I felt like this site needed a face lift.

Fonts

I’ve been getting more and more excited about the impending freedom of the @font-face CSS declaration. The prospect using any true-type or open-type …Read More

CSS vs Tables: You’re Doing It Wrong

Definitions first.

Table

A specified set of columns and rows with cells that automatically and fairly smartly expand to fit their contents; cells can span rows or columns; the table as a whole can be treated as one block, and cells can contain tables. A table is a metaphor for visually laying out 2-dimensional content.

CSS

cascading style sheets; …Read More

Foo Hack Redesign 3.0

So, it started out as just a few font changes. I’d been growing less and less pleased with Trebuchet MS, and had found a few cases where it broke the militant line-height rules I’d set for this site. In general, I felt that it was too crowded, and the gray hash textured background …Read More

CSS Modal Dialog that Works Right

In my last post, I touched on a method to get different browsers to handle the inline-block display style. I decided to use that on a project that I’m working on now that has a few modal dialogs. Modals are usually done wrong on the web, but I’m pretty confident that this approach does it right.

Feel free to skip all this and go straight to the example.…Read More

Cross Browser Support for inline-block Styling

Inline-block layout solves a lot of problems. It lets you do some cool stuff previously thought impossible with CSS. It makes vertical alignment work properly. And sadly, it’s supported pretty badly. I learned a new approach from one of the best insane inventor webdevs I know. The pieces have been out there for some time, it seems, but I hadn’t ever seen this spelled out as simply and elegantly as he did it. …Read More

Top 5 CSS Mistakes

This is not a post about the top 10 mistakes that developers make when they write CSS. That’s boring.

The CSS spec itself is littered with mistakes. Deep, fundamentally misguided errors. Real head-slapping WTFs that make you wonder if the people writing the spec had ever created a website in their lives. …Read More