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.
flamebait (Score:0, Insightful)
Re:Why is CSS such a good idea but a pain to use? (Score:4, Insightful)
It's really not that bad once you get on to it. It would be nice if it could do math to calculate positions/sizes/etc., and supported multiple backgrounds for a single element, ala Safari. But all in all, it's poor browser support that really makes CSS difficult.
Vertical CSS Support (Score:5, Insightful)
As a developer who works with CSS every day, I find one complication that continues to bother me in my daily work. Support for CSS has always been good on the horizontal scope, but vertical positioning has always been quite complicated. Alone the procedure to affix a footer to the bottom of a screen in dependance of the amount of content is unnecessarily difficult, spawning hackish solutions such as "footerStickAlt" [themaninblue.com]. Centering an object in the dead center of a page also requires strange procedures such as this one [wpdfd.com], which still aren't ideal (try making the viewport really small). The old table method provided much easier methods for this. What are your thoughts on this and do you see improvement following in future CSS revisions?
Re:Why is CSS such a good idea but a pain to use? (Score:4, Insightful)
Vertical centering is just as important. I want to be able to (without tables) place a 500x500 box center of the window without resorting to some wierd javascript to do it. You give me a div (or p) that does this in all browsers with zero javascript and I will be impressed.
Browser support is the other issue, and it is a killer.
That said, I love the concept and most of methods, I just hate the browser wierdness.
Acid2 test? (Score:3, Insightful)
For your reference: http://www.webstandards.org/files/acid2/test.html [webstandards.org]
I need validation in my life (Score:1, Insightful)
Re:Why is CSS such a good idea but a pain to use? (Score:5, Insightful)
- You are supposed to separate content and visual elements. An input is both.
- An HTML page has to be XML. To achieve this part of positioning is delegated to attributes.
- The belief that tables are bad. In fact they are very intuitive elements - unlike the DIVs. It would have been much better if we could do with one block element that had the strong points of both tables and divs.
- A total disregard for consistency. Every HTML page contains 3 languages for the same thing: HTML, CSS and javascript. In many cases all three use slightly different names for the same thing. It would have been much better if they had been integrated into a consistent interface.
My question for Hakon: HTML became popular because it was so simple to use that everyone could use it. CSS by contrast is so complicated that only fulltime professionals understand it. Will CSS stay an elite thing?
Re:Padding (Score:3, Insightful)