Hacker News new | ask | show | jobs
by rabidgnat 5837 days ago
There are plenty of problems with CSS. You can't specify the width of an inline element, for one. That alone prevents a lot of reasonable layouts, like tables. Also problematic is a standards body that ignores this use case! In this case, they protect the writer from over-filling some boxes with more boxes. But that would at least be visible - in this case, the workarounds end up far worse.
2 comments

If you want a table layout, why not just use a table? Or you can use display: inline-block if you want to give a width to an inline element.
I run into plenty of situations where I have multiple lines, and I'd like the respective elements to align. It's not limited to tabular data, but it's the easiest example
Tables FTW. It's the HTML element for controlling horizontal and vertical relationships at the same time.
> You can't specify the width of an inline element, for one.

  display: inline-block;
  width: ...

?
Unfortunately, bad browser support :/

http://www.quirksmode.org/css/display.html

That was primarily in the context of "Also problematic is a standards body that ignores this use case!" part of your comment.

Besides if you don't care about antiquated browsers (eg IE6), the inline-block is a viable option. In IE it will require some massaging, but it can be made to work quite easily.