Earlier quoted context omitted.
Sweet. I figure only 15 more years until we get two column layouts working, and then we'll finally be able to publish like it's 1979.
CSS multicolumn layout is four years old. It's implemented in all the major browser engines, and many popular sites like Wikipedia use it. http://www.w3.org/TR/css3-multicol/
How to Center in CSS
121–130 of 297 posts
Re: How to Center in CSS
#122Earlier quoted context omitted.
You're in luck. foo { display: flex; /* opt into the new box model */ justify-content: center; /* "align" */ align-items: center; /* "valign" */ } Vendor prefixes may or may not ruin your day (for now), but the spec is there and is exactly what you want. CSS is no longer "badly broken" if that's your metric.
Funny, because you say he's in luck and yet, that isn't at all what he wrote. At all.
Re: How to Center in CSS
#123I can't think of a technology that has both saved and wasted more of my time than CSS.
Re: How to Center in CSS
#124Earlier quoted context omitted.
The problem with tables for layout is that the layout algorithm is incredibly complex. People seem to think it's simple, because it kinda does the "right thing" in many cases, but it's actually ill-defined, varies between browsers, and has only a work-in-progress spec [1]. Width calculation is defined in terms of linear interpolation between the closest of four "candidate guesses" which bound the available width. And…
A basic rule of universe is that complexity remains, you can merely shift it around. The table layout algorithm might be incredibly complex, but I'd rather have a browser writer have the headaches than me.
Not really. CSS grid systems (like in Bootstrap) require some ugly and non-semantic markup, but they're not very complex.
Re: How to Center in CSS
#125Earlier quoted context omitted.
I also find it crazy how there was a huge campaign to remove use of the table tag for layout. 'It's non semantic! You're mixing layout and content!' people would cry over and over. .. But then we've ended up with bootstrap and it's grid layout, where we're doing exactly that, and for some reason it's perfectly fine.
and I wonder how the somehow survived unscathed and free from the semantic witch hunt of yore. shouldn't we replace them with: ?
Of course, the issue would probably come up rarely, since the browser stylesheets for those tags don't do anything particularly useful for anything other than lists and list items.
Re: How to Center in CSS
#126Wow CSS is unfriendly, you really realise how poor it is once you learn other layout systems (android's XML and iOS auto layout, etc). Wish there was another standard that could co-exist side by side on the web, something simple enough to be implemented reliably by the browser vendors.
> Wish there was another standard that could co-exist side by side on the web, something simple enough to be implemented reliably by the browser vendors. That standard exists. It's called flexbox. It was designed to solve exactly this problem (among many others), and does. That said, as I never tire of mentioning, vertical centering was a part of the design of CSS 2.1. The technique is called "absolute centering". Se…
wtf?
do...do they know...how many manhours could've been saved...?
Re: How to Center in CSS
#127Earlier quoted context omitted.
Indeed I have non-TABular data and yet I should use TABle-cell? I'll just stick with the actual then. cleaner. But the real problem is "use divs". plural. so already breaking the #container_of_container cruft rule. I'd rather write some javascript with overly nested callbacks and leave the html clean. thanks.
is content, table-cell: is presentation. Semantic tag use matters because some people are blind and their screen reader will start randomly start talking about some structure that makes zero sense in context
Re: How to Center in CSS
#128Earlier quoted context omitted.
> Wish there was another standard that could co-exist side by side on the web, something simple enough to be implemented reliably by the browser vendors. That standard exists. It's called flexbox. It was designed to solve exactly this problem (among many others), and does. That said, as I never tire of mentioning, vertical centering was a part of the design of CSS 2.1. The technique is called "absolute centering". Se…
But then what happened to it? wtf? do...do they know...how many manhours could've been saved ...?
Re: How to Center in CSS
#129Earlier quoted context omitted.
> Wish there was another standard that could co-exist side by side on the web, something simple enough to be implemented reliably by the browser vendors. That standard exists. It's called flexbox. It was designed to solve exactly this problem (among many others), and does. That said, as I never tire of mentioning, vertical centering was a part of the design of CSS 2.1. The technique is called "absolute centering". Se…
But then what happened to it? wtf? do...do they know...how many manhours could've been saved ...?
Re: How to Center in CSS
#130Earlier quoted context omitted.
Every 4 years: "lets check if latest css can center dynamic sized things without a bunch of #container_of_container cruft". Just stick with: And what the hell does "margin: auto" mean ? I'd like to hear some print designers using that in normal conversation. "oh and also i'd like these margin's auto'ed". At this rate the table tag is going live longer than the copyright on mickey mouse.
I also find it crazy how there was a huge campaign to remove use of the table tag for layout. 'It's non semantic! You're mixing layout and content!' people would cry over and over. .. But then we've ended up with bootstrap and it's grid layout, where we're doing exactly that, and for some reason it's perfectly fine.