A perfect example of how badly CSS can fail for such a simple, practical task.
Posted on Saturday, February 28, 2009 at 3:31 PM.I read through an article today that shows the struggles Web developers go through to perform basic layouts using CSS. In the article's particular example, it's simply some images and some associated textual content displayed in a grid-like manner, with the amount of text being variable.
In short, it's a practical, real-world data display that should, one would think, be very easily accomplished using CSS. As is often the case when using semantic markup and CSS, what should take only a few minutes balloons out into a battle against unexpected behavior, browser incompatibilities, browser bugs, and so on.
Whatever benefits CSS might have brought are quickly eliminated by the time and effort necessary to get the content displaying even remotely correctly. But we must also consider that the end result becomes nearly unmaintainable. Other Web developers working with the code later on will likely not appreciate or understand the struggles that went into getting everything working in the first place. Making even minor changes might not be possible, or might be extremely time consuming, with much care needed to avoid rendering incorrectly in various browsers.
I'm not suggesting that HTML tables would necessarily be a better solution. I just find it extremely bothersome that such a simple task so quickly becomes such a huge hassle when using CSS, with the end result being quite fragile. This is what we'd expect to see from an immature technology, yet CSS has been in the works for roughly 15 years, and has been implemented by a number of different groups. It's pretty pathetic, really.








