Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Ask Håkon About CSS or...? 326

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.
This discussion has been archived. No new comments can be posted.

Ask Håkon About CSS or...?

Comments Filter:
  • Re:Just one question (Score:0, Informative)

    by Anonymous Coward on Tuesday June 20, 2006 @01:37PM (#15570681)
    > 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.)
  • Re:Where... (Score:1, Informative)

    by gaveawaymyname ( 934554 ) on Tuesday June 20, 2006 @01:48PM (#15570767)
  • Re:Pronunciation (Score:5, Informative)

    by EvanED ( 569694 ) <{evaned} {at} {gmail.com}> on Tuesday June 20, 2006 @02:02PM (#15570877)
    To be fair, "how come" is how he describes it on his website [opera.com], and he even uses the email address howcome@opera.com. That wasn't an editorial or something by the editors.
  • Re:Padding (Score:5, Informative)

    by pikine ( 771084 ) on Tuesday June 20, 2006 @03:27PM (#15571576) Journal
    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.
  • by ottffssent ( 18387 ) on Tuesday June 20, 2006 @04:37PM (#15572051)
    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.
  • by Snover ( 469130 ) on Tuesday June 20, 2006 @08:08PM (#15573217) Homepage
    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.
  • by colmore ( 56499 ) on Wednesday June 21, 2006 @01:44AM (#15574224) Journal
    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.
  • by gfxguy ( 98788 ) on Wednesday June 21, 2006 @09:16AM (#15575234)
    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.

If you have a procedure with 10 parameters, you probably missed some.

Working...