Slashdot Mirror


Ask Håkon About CSS or...?

Back in 1994, while working for the World Wide Web Consortium (W3C), Håkon Wium Lie (pronounced more or less "how come") proposed the idea of Cascading Style Sheets (CSS). Got a CSS question? An Ajax question? Want to know why Håkon loves Free Software so much? Or something else, related or not? Go ahead and ask -- after checking some of the links above, so you don't duplicate questions he's answered in other interviews or in articles he's written. (One question per post, please.) We hope to post his answers Friday.

8 of 326 comments (clear)

  1. Re:Just one question by Anonymous Coward · · Score: 0, Informative

    > Did your parents happen to know English when you where born?

    Better than you, apparently.

    (pro tip: The second-person past-tense form of be is were.)

  2. Re:Pronunciation by EvanED · · Score: 4, Informative

    To be fair, "how come" is how he describes it on his website, and he even uses the email address howcome@opera.com. That wasn't an editorial or something by the editors.

  3. Re:Padding by pikine · · Score: 5, Informative

    Space inside the box is the "padding," while space around (outside) the box is the "margin." Between "padding" and "margin," there is also a "border." I'm not sure if asking how the terminology is determined is very interesting.

    --
    I once had a signature.
  4. Re:Included styles, aliases by ottffssent · · Score: 2, Informative

    You can achieve the same effect, albeit in a slightly different way.

    For example, rather than define a variable and use it in style declarations throughout the document, you simply define one property of multiple selectors at once.

    So rather than

    H1 {color: col1; other-styles-here}
    PRE {background-color: col1; other-styles-here}

    you would, instead, write

    H1, PRE {color: blah}
    H1 {other-styles-here}
    PRE {other-styles-here}

    Now, it's not quite as elegant since it would separate logically-related style groups by forcing together selectors that happen to share some property, rather than keeping selectors together based on semantic usage (say, all your navigation bar-related styles in one big group). But it does work.

    If you read Lie and Bos, it's clear they've put a lot of thought into why things are the way they are, and if it's difficult in some ways there's a good reason for it somewhere else. At least, that's been my experience.

  5. Re:CSS for table columns? by Snover · · Score: 2, Informative

    Why can't we just place styles on a <col> or <colgroup>, and have it cascade down?

    You can (<col class="whatever">). However, the instant you add classes to any of the rows or cells in the table, it stops working, so it's not very useful.

    --

    [insert witty comment here]
  6. Re:Why is CSS such a good idea but a pain to use? by colmore · · Score: 2, Informative

    If you don't think tables are bad, then you aren't designing for cellphones, text-only brpwsers, braile readers, etc. etc. etc.

    If you're just making static pages for personal use, go ahead and do whatever. The primary goal of stylesheets isn't to make layout easy (obviously...) it's to break down elegantly on non-standard devices. A good CSSed document will be inteligeable if all formatting gets turned off and it just reads as a long page of text.

    While the language has its problems, MOST of the complaints seem to come from people who want to put their heads in the sand and pretend like it's 1998 and all you need to do is make sure your page renders at 800x600 on two browsers and you're done. The web's a bigger place than that now, and the technology has by necessity gotten more complicated.

    --
    In Capitalist America, bank robs you!
  7. Re:Why is CSS such a good idea but a pain to use? by gfxguy · · Score: 2, Informative

    Which is why tables are still better for some simple layouts - more compatible and they do what you want.

    I'm all for separating markup from layout, but it simply doesn't work right yet.

    --
    Stupid sexy Flanders.