Ben Godfrey

CSS suxxors revisited

A friend of mine, Rog, asked me what I thought of a design he was working on. He showed me a template page and I thought it was pretty nice. It was a pretty simple layout but he’d done it all with tables. He had a lot of borders and blocks of colour which were ripe for CSSifying. I decided to rewrite his page to demonstrate how easy it would be to him.

An hour later I’m furious. It wasn’t supposed to be like this. It was a clean simple, bottom up design that is tailor made for HTML. Yet to achieve it all in CSS I have to go at the browser with a series of hacks and workarounds. Bollocks! I’m not prepared to do it. I’ve abandoned the project and mentioned it to him as an aside.

He has a set of navigation tabs with a border. They’re on the right. I can’t put them on the right with CSS, it has no support for right-aligning block elements. I positioned them absolutely, but they will move relative to the content if the font sizes are changed drastically.

He has two columns nested within a lot of thin borders which look nice, if I use absolute positioning I lose the borders, otherwise I have to put up with the browser trying to wrap the page content around the navigation which I don’t want. I want two columns. If instead I float the larger content area, again the borders go AWOL.

Nothing I’ve learned today has changed my opinion that CSS is not powerful enough to allow the development of genuinely flexible pages, ones that can be made to look great whatever happens to the browser or the fonts or the colours or anything. I should be able to ship a page that degrades progressively as you use less design-aware technology. Instead I get something that just about works on my browser and instantly looks horrible in anything else. Is that so fucking hard?!

Look at our new car! It’s the best!

Can I take it on the motorway?

Sure you can drive it on the roads as fast as you want!

Can I take it on the motorway?

Um, no.

I wonder why nobody’s buying…

Comments

mat's avatar

mat

I've just been told that one of my recent, CSS only pages breaks horribly in IE5.0/Win. I dread what I'm going to have to do to the already hax0r3d to nastiness stylesheet to try and get it to behave...

CSS is fine for doing page layout, provided it's designed for from the start, which is rarely is, as developer-designers are pretty rare (blog owner notwithstanding : ) but, IMHO, the set of problems you get with CSS are roughly as bad as the ones you get with tables, just very different. My page that breaks in IE5 renders near-perfectly (OK, it's not in three columns, but I don't want it to be) on an Ericsson P800 (Opera?) or on Dillo on an iPaq - try doing that with a table layout!

It really is Horses for courses, but unfortunately, we need some kind of all-terrain, sports-utility horse that can handle anything, yet still go on the motorway. Give it ten years, and it might be ok. Either that, or I'm going to go and live in the desert with nothing but a CLI and links for company...

Cancel

Comments are closed for this post.

mat's avatar

mat

can I edit my comments? I suppose that would be extremely difficult. Probably best to just ignore the typos above then.... : )

Cancel

Comments are closed for this post.

Ben Godfrey http://aftnn.org

Dude, Notepad is a great design tool as long as you design with it in mind, but you won't end up with a great looking page in the context of the wider world. The infuriating thing for me about CSS is that it's very close to being an excellent solution to the problem of publishing for the web. It's a current standard and it should be evolving and making things better for all classes of page author. It's great that you can publish a document that works on a P800, but you should be able to do that and build top-down designed foxy pages for all browsers easily. Instead they're spending their time concocting ridiculous selectors that are useful to a much smaller subset of authors and, as far as I can tell, completely ignoring any suggestions made by mailing list contributors.
Cancel

Comments are closed for this post.

Keefieboy's avatar

Keefieboy

CSS sux. Always has, possibly always will. No 't's not true, I hope, sometime soon the engineers who spec this stuff will figure out what people actually want it to do, and make it so (in my dreams!). But for now, it's bloody hard work.

www.webmasterdubai.blogspot.com
Cancel

Comments are closed for this post.

Add a new comment

Comments are closed for this post.