This is Dan Moore's Typepad Profile.
Join Typepad and start following Dan Moore's activity
Join Now!
Already a member? Sign In
Dan Moore
Recent Activity
I've never really felt the need for variables/constants or other programming features in CSS. In fact I think it would make it too fiddly. After all, as has been said, HTML doesn't have programming features but this is made up for by either JavaScript or server side languages, which are both options for CSS. There are however several things that really annoy me about CSS: - As you say, vertical alignment is rubbish. Why tables, which are supposed to be the old way of doing things, in this instance are better at layout seems backwards to me. - Column layouts. There is no way to make all columns the same height if the height of one or more column is unknown eg. due to dynamic content. Again, tables are really the only option. Sometimes when trying to fix this without tables, I feel like I'm spending far too much time and resources into it instead of just using tables. Again, in this specific instance, a step backwards for CSS. - The box model. If you have a div that is 500px wide and you put padding, border or margins on it, the width it takes up on the page is added to. This makes no sense. If you've allocated 500px of space on the page for a div, then if you add borders or padding (not so much margins) then obviously you want it not to take up any more room. That is annoying enough, but if the width is 50% and you want a border, then you end up with 50%+1px. There is no way to allocate exactly 50% of the width of the container for the div. So fluid layouts can end up being a real nightmare with lots of wrapper divs (a pet hate) or you could just give up and use tables again. I think I've given the impression that CSS is completely awful, but to be honest those situations don't come up that often. But when they do I just wonder why it's harder to do a certain styles in a method that is designed specifically for producing styles than it is in an outdated method.
Toggle Commented May 12, 2010 on What's Wrong With CSS at Coding Horror
Dan Moore is now following The Typepad Team
May 12, 2010