4 ms·
I agree with gizzlon. The inline-block versions are the closest things to actually saying "put this block in the middle". For a system that claims to be all abo
by moron4hire 13y ago
I agree with gizzlon. The inline-block versions are the closest things to actually saying "put this block in the middle". For a system that claims to be all about layout, it shouldn't be so obtuse to say "stick this, whatever this is, in the middle."
Also, auto-flowing text split between columns as a "column" property of some kind would be nice.
The list you provided is handy, but it shouldn't require knowing that you have to look up specific cases.
- hnriot 13y agoThere's an old phrase that the bad workman blames his tools and it seen to apply here too. It's really not difficult and why complain about it being obtuse? If you understand the fundamentals then it makes sense. As for the last sentence well the list he provided is only for people that need to look it up (like you) - that's like me saying to my car mechanic that I should have to look up where the fuses are in the car. If you don't know something you have to look it up (taking what? .4 seconds on google?) - if you knew it you'd obviously not have to look it up. Stop whining and learn this stuff.
- moron4hire 13y agoThat wasn't really necessary. I'm glad you get to work in UI-world all day long that CSS' idiosyncrasies are something you can memorize inside and out. Personally, I'm required to know a lot more about mathematics and databases. My clients can deal with not-very-pretty UI, they can't deal with lost or incorrect data. But if you want to make analogies about tools, one should always use the right tool for the job and not employ hacks. To me, "margin:auto" is a hack. It doesn't express that the object in question is being put in the middle of something else. It hides the intent of the action behind insider jargon. Or, to continue your analogy, it's using the handle of a screw driver to hammer in a nail.
- coldtea 13y ago>There's an old phrase that the bad workman blames his tools and it seen to apply here too. Not all of us are "workmen" here, that have to get used to our tools, etc. Some of us are actual scientists and engineers, with lots of experience in identifying broken APIs and tools. Some of us even PROGRAM the tools you get to use, from CSS implementations in browsers to editors and such. Heck, there are people on HN from Mozilla, Google, Apple and MS. CSS, with regards to layout, has been broken from the start. That's not up for debate just because someone has mastered all the intricasies. Even the original authors and the W3C agree and have taking corrective steps in later CSS versions (still not widely supported). So "Stop whining and learn this stuff" is not really an answer in a technical debate.
- User1398 13y agoSplit text between columns... http://jsfiddle.net/BZuu9/ http://jsfiddle.net/BZuu9/
- moron4hire 13y agothanks, that is much appreciated.
- e12e 13y ago[edit: I appreciate the constructive example, should've mentioned that.] Which unfortunately looks like crap, as there is no (standard) way to get browsers to hyphenate words in a sane way :-( [edit: I wish CSS Regions was (or was likely to become) a viable solution, as it actually does what a lot of people want: a sane and standard way to lay out text, based on experiences from dtp. Sadly, afaik, it's unlikely to be accepted, and I'm not sure if there's even a decent way to get it to work with a polyfill (suitable for production): http://dev.w3.org/csswg/css-regions/Overview.src.html http://dev.w3.org/csswg/css-regions/Overview.src.html https://github.com/adobe-webplatform/css-regions-polyfill https://github.com/adobe-webplatform/css-regions-polyfill In theory css-regions along with hyphenator or hypher should be enough to have layouts that are both semantic, look good, and are simple to implement. It's been a while since I tried to get it to actually work, and I don't remember it as "just working" (that would include proper pagination both on small screens and on print outs, without too much effort): http://code.google.com/p/hyphenator/ http://code.google.com/p/hyphenator/ https://github.com/bramstein/hypher https://github.com/bramstein/hypher ]
- e12e 13y ago> For a system that claims to be all about layout, it shouldn't be so obtuse to say "stick this, whatever this is, in the middle." Ah, but unfortunately CSS isn't about layout at all. Hence proposals like css-regions (see comment below) -- which are about layout. It's a common mistake: We came to html (with our designer hats on), and thought: Oh, we can layout text with tables! We were wrong, and we got css -- and we thought: Oh, we can layout text with CSS -- but we were still wrong. We could do some minor (and as it turned out pretty major) styling with CSS -- but it was never really meant for layout. We do need a system for layout, and perhaps the most sane thing to do these days is to wrap CSS into a tool that does styling and layout. But CSS of today isn't quite there. See: http://www.w3.org/TR/WD-css1-951117.html#abstract http://www.w3.org/TR/WD-css1-951117.html#abstract "This document specifies level 1 of the Cascading Style Sheet machanism (CSS1). CSS1 is a simple style sheet language that allows authors and readers to influence the presentation of HTML documents. E.g., a publisher can suggest font families, colors and layout for a document, while the reader can ask for the document to be magnified. By attaching style to HTML elements, document structure and device-independence is preserved." Over-eager use of emphasis mine. While it contains the word layout, it's set in the context of HTML documents -- and I think that was a mistake. Still it brought us forward from what things was like before the mid 90s!