About this site's lack of design: Yes, it's supposed to look this way — I'm helping create a new sandbox theme for WordPress (see it on GitHub).

Dan Rubin's SuperfluousBanter

Suffering from chronic idiocy since 1977

|

Cascading Severity Sheets

I think CSS
is a poor design tool. There, it’s out, I’ve said it. Now, shoot
me for all I care. Well, I’m sorry, but it’s not because we’ve
found some new improved way to build bet­ter, more acces­si­ble and leaner web
sites that I’m going all bonkers or any­thing. Sure it’s great and
believe me, I wouldn’t go back to tables even if I’d get a peek
at Janet
Jack­son
’s other tit (so ok, maybe I would). Any­way, CSS is prob­a­bly
close to the best thing that ever hap­pened to web design since blogs…
errr… bread came sliced.

What's up with that box modelSo,
dude, what’s the fuss all about if you think CSS is that great?
I’m glad you asked. First of all, what’s up with that box
model
? Seri­ously? If I define the width of any­thing I mea­sure the space
between two extrem­i­ties. Not some awk­ward value in between. Padding is inside
the box, so leave that alone, thank you. Next, floats.
I go nuts work­ing with floats. Thank­fully, Eric
Meyer
is able to shed
some light
on most issues, which prob­a­bly saved my life. But still, the
float con­cept is dubi­ous at best. Actu­ally every­thing related to CSS-P
is pretty much a pain. Sure, bad browsers are respon­si­ble for most of my headaches;
nonethe­less I wish CSS was more intu­itive to (graphic) designers.

Maybe it’s just igno­rance; not under­stand­ing CSS and all the hacks, tricks
and gal­lons of cof­fee that come with it. And again, don’t get me wrong,
I much appre­ci­ate all the hard work Bert,
Håkon,
Tan­tek and fel­low W3C
peo­ple are doing. Yet I think we could use a bit more style in CSS. How does
that abbre­vi­a­tion spell out again? Exactly.

This item was posted by dhilhorst on Wednesday, February 4th, 2004.

Categories:

You can follow comments on this item via the RSS 2.0 feed.

Comments are closed.

14 comments on “Cascading Severity Sheets”

  1. Posted by yafujifide on Wednesday, February 4th, 2004.

    Floats would be great, if only we didn’t have to use them to for­mat entire lay­outs. We should be able to define divs as table-like ele­ments, which is pos­si­ble with CSS, just not in IE.

  2. Posted by Mike D. on Wednesday, February 4th, 2004.

    You’re right. CSS is not a great design tool at all. It’s bet­ter than tables in most ways, but not quite as good as them in a few ways (i.e. ver­ti­cal align­ment, and the abil­ity to have sin­gle cells span across mul­ti­ple cells like with colspans and rowspans).

    I think the clos­est CSS-P method to what we’re look­ing for is absolute posi­tion­ing. It basi­cally gives us what we want… the abil­ity to pin things to cer­tain areas of the page with­out regard for where they appear in the code, but the huge prob­lem with absolute posi­tion­ing is that absolutely posi­tioned ele­ments are com­pletely igno­rant of their sur­round­ings, and their sur­round­ings are com­pletely igno­rant of them.

    The most obvi­ous case of this is when you have a multi-column lay­out and you try to posi­tion a footer at the bot­tom span­ning the width of all columns. You can’t do it with­out javascript or a ridicu­lous dec­la­ra­tion of which col­umn must always be the longest. It can’t get much lamer than that. The sim­ple abil­ity to wrap a mas­ter div around your columns and then place the footer after the mas­ter div would solve everything.

    It bugs me that vir­tu­ally no money has gone into the mar­ket­ing of browsers through­out the years. Com­pa­nies spend all this time devel­op­ing a browser and they just kind of let peo­ple adopt it at their own pace. Imag­ine if a large com­pany were to develop a fast, free browser which used CSS-3 and even extended upon it address­ing some of the design issues we all have. A TV ad dur­ing the Super Bowl would cost about $2 mil­lion. That’s a bit much. But what about a series of ads on pop­u­lar shows? What about an online cam­paign? How about some PR from writ­ers like The Wall Street Journal’s Wal­ter Moss­berg? It just seems like with some effort, browser devel­op­ers could really stir up some excite­ment about such a prod­uct. Enough to make it worth their time to develop. We’re talk­ing about $10 mil­lion in mar­ket­ing, tops. I’ve seen Microsoft give away more than $10 mil­lion in a day. I’ve seen Apple spend a lot more than $10 mil­lion on devel­op­ing the Cube. It just doesn’t seem like a lot of money for a decent sized com­pany… con­sid­er­ing all of the good it would do for everybody.

  3. Posted by Brian on Thursday, February 5th, 2004.

    Silly idea, here… Why not make a new breed of table, a real design ele­ment? They’re obvi­ously far more flex­i­ble and famil­iar than the boxes everyone’s worked up about now. If the design­ers of CSS would put half as much effort into mak­ing real lay­out tools, nobody’d even worry about floats and divs and box mod­els and all that nonsense.

  4. Posted by David Dorward on Thursday, February 5th, 2004.

    Brian,

    becuase HTML shouldn’t have design ele­ments in it, its a struc­tural lan­guage. How­ever as yafu­ji­fide said — you can use CSS to tell ele­ments to act like tables.

    body { dis­play: table; }

    #doc­u­ment { dis­play: table-row; }

    #con­tent, #nav { dis­play: table-cell; }

    It just doesn’t work in MSIE… and that stan­dard came out over HALF A DECADE ago!

  5. Posted by Houser on Thursday, February 5th, 2004.

    Um… am I miss­ing something?

    First of all, if you want some­thing to act like a table, chances are you should prob­a­bly be using a table. The back­flips you’ll have to do to and the code you’ll write to make seman­ti­cally cor­rect markup “look like a table” will not be worth NOT using a table. Use the right tool for the right job.

    Sec­ond, while I agree there are some lim­i­ta­tions with div’s “colspan­ing” ele­ments, don’t over­look the width:xx% abil­i­ties. For example:

    <style>

     #cont { width:100%; }

     #col­heads, #cont dl { margin:0px; padding:0px; }

     #col­heads li { width:25%; float:left; background-color:#eee; }

     #col­heads #activ­i­ties { width:75%; background-color:#ccc; text-align:center; }

     dt, dd { margin:0px; padding:0px; float:left; width:25%; border-bottom:1px solid #ccc; border-right:1px solid #ccc; }

     dt { border-left:1px solid #ccc; }

    </style>

    <div id=“cont”>

     <ul id=“colheads”>

      <li> </li>

      <li id=“activities”>Activities</li>

     </ul>

     <dl>

      <dt>Mike</dt>

      <dd>walking</dd>

      <dd>swimming</dd>

      <dd>biking</dd>

     </dl>

    </div>

  6. Posted by owen on Thursday, February 5th, 2004.

    as a pro­gram­mer I find that CSS depends too much on the images, lists and links. Are there any other tricks?

  7. Posted by Brian on Thursday, February 5th, 2004.

    HTML may be a struc­tural lan­guage, but the web is a visual medium. A struc­tural lan­guage is won­der­ful for stor­ing data, but pre­sent­ing it is an entirely dif­fer­ent matter.

  8. Posted by Hemebond on Thursday, February 5th, 2004.

    The box model does make sense. How else would you apply padding, mar­gins and bor­ders to a fixed-size image?

  9. Posted by Egor Kloos on Friday, February 6th, 2004.

    To be quite hon­est I don’t see CSS as a design tool, it’s not like a pen­cil or a crayon. Per­son­ally I try to sep­a­rate my cre­ative work as mush as pos­si­ble from the pro­duc­tion side. But seman­tics aside I also don’t think that CSS all that. There are still some hor­ri­ble gaps in what you need to do for page lay­out, so you end up work­ing some fancy CSS trick to get it to ren­der prop­erly. Never mind get­ting it to work cross­browser and the less said about work­ing cross­plat­form the better.

    CSS3 seems to offer more in the way of lay­out­ing a page so that may help some what. But that’s still years away. Even if Microsoft imple­mented CSS3 into Long­horn it would still be at least three years away before we could con­sider using CSS3. We can’t even fully use CSS2 yet! So were stuck with what we’ve got.

    Well I’m start­ing to get the hang of it now so I shouldn’t com­plain to much ;)

  10. Posted by Richard Allsebrook on Sunday, February 8th, 2004.

    but the web is a visual medium”

    …only if you have have a work­ing pair of eyes :-(

  11. Posted by Tony C. on Tuesday, February 10th, 2004.

    I agree that it’s some­times a pain to track down and fix seem­ingly bizarre dis­play prob­lems in CSS, par­tic­u­larly those caused by Inter­net Explorer. How­ever, I think it’s worth it.

    Sep­a­rat­ing the style from con­tent just makes sense to me on many lev­els. Not only from an acces­si­bil­ity stand­point, but also from a con­tent con­trib­u­tor stand­point. At work, we can’t afford a big fancy con­tent man­age­ment sys­tem (and prob­a­bly coulcn’t live with the mess most of them cre­ate any­way), so we rely on reg­u­lar folks to con­tribute con­tent. Teach­ing them to use prod­ucts like Macro­me­dia Con­tribute, or even DWMX, or even a sim­ple in-house con­tri­bu­tion form…and hav­ing to only explain that a para­graph is a para­graph, a head­ing is a head­ing, etc…just makes my life so much easier.

    Gone are the days of try­ing to explain to a sec­re­tary what a colspan is, or how to get her graphic to show up on the left instead of the right. It’s now done entirely through styles, and everybody’s happy.

  12. Posted by charles on Tuesday, February 10th, 2004.

    Regard­ing the box model and padding:

    In the next ver­sion of CSS you’ll be able to spec­ify between the padding count­ing towards the width or not.

    So in a long while…

  13. Posted by David House on Saturday, February 14th, 2004.

    The box model was cho­sen because it can emu­late other box mod­els, whereas other box mod­els can’t emu­late it. Plus, with CSS3 you get to choose, any­way. Floats: I don’t see any prob­lems most of the time. I gen­er­ally float all my main ele­ments in my page and they all fit in nicely. The fact that you can’t have width:auto on floats is some­what annoy­ing, but workarounds are present.

    Per­son­ally, I’d rather use CSS than an XML based equi­li­vant — espe­cially some­thing like XSLT-FO that ruins your struc­ture. I have longed for a while for an XPath exten­sion to CSS, maybe some­thing like el:x-path(Xpath expres­sion in here), as some­times I find myself think­ing in terms of xpath and not CSS selec­tors, although the lat­ter is gen­er­ally much more powerful.

  14. Posted by GaBuBu on Saturday, February 14th, 2004.

    I took the chance of trans­lat­ing your post into Span­ish, as i totally agree with you. You can check it in my URL, 14th Feb­ru­ary! Thanks, hon­estly i appre­ci­ate what u think! I thought i was the only one get­ting mad with CSS.