Blog de Humpty

Express your heart's desire

Recent Posts

Tags

Email Notifications

People

Cool Sites

Archives

I've had it with CSS!!

I am sick to death of CSS and I ain't gonna take it no more.  Why is it so damned difficult to lay out elements horizontally on the page!  Geezus.  I want to move away from layout tables, trust me, I do, but not being able to lay out elements horizontally is just killer.  The only options are tables, floats, or absolutely positioned elements.  Can't use tables, since, hunh, I'm trying not to.  Floats work, until you put one next to another and then decide, maybe, that you want to put something underneath the second float...  See, according to the specs if you want to put something under a float you have to clear it, which unfortunately places it underneath all floats before it!  So what's next, position:absolute.  Pretty nifty, I like it, only one problem, it's not in the flow of the document so you can't wrap anything around it, can't use percentages, footers, blah blah blah.

I just don't get it.  Laying things out vertically on the page works fine, but try doing things horizontally and all hell breaks loose.  When I designed the interface for my Firefox extension I used XUL and marveled at how well it layed things out, both vertically and horizontally.  I don't want to turn this post into a XUL primer but trust me, it's cool.  Why can't CSS be this easy in laying things out?

CSS zealots say don't use tables, well give me something better and I won't, and no CSS is not better than tables.  A lot of their argument is basically, "but think of the blind."  Well, I say the blind should get better screen readers.  I swear I'm going to start using class="thisaintadatatable" on my layout tables.  So if you're a screen reader manufacturer key on the text "aint a data table" and then you'll know, this ain't a data table.

Posted: Tue, Aug 29 2006 5:17 PM by Humpty | with 2 comment(s)
Filed under: ,

Comments

Josh said:

Two pointers for you when messing with this stuff:
http://www.stopdesign.com/examples/ms/home-04-header.html for side by side layout (view source for the header implementation) and
http://www.alistapart.com/articles/holygrail for three column side by side layout.

It's doable, but not easy. I often find myself a single attribute off from implementation, pulling my hair out. Then you find the one missing item and you say "oh yeah - duh!"
# August 31, 2006 10:35 PM

Humpty said:

The holy grail article is a pretty neat trick.  My main reason for griping in the post though was because of the unnecessary complexity of CSS, and that article just demonstrates it.  It's neat that you can do it, but it's no where near as simple as just having a table.  Even XUL allows you to lay out elements horizontally and it's butt easy to figure out.

CSS in terms of layout is overly complex in my opinion.  I mean think about how easy it is to create vertical layouts, there's no need for a holy grail article on them.  It's only horizontal layouts that necessitate neat tricks such as that article.  Why can't CSS layout elements horizontally as simply as it lays out elements vertically?  That's my main gripe.

I hope a successor to CSS comes along because I am sick of it.  That's why I'm some ways I'm regressing back to layout tables.  I won't contain an entire page in them so that it'll be possible for a browser to render it as it downloads, but I'm also not going to jump through CSS hoops anymore just for the sake of not using layout tables.
# September 2, 2006 9:41 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Enter the numbers you see in the image: