I have decided for me at least that a fixed footer and header is what I consider my "holy grail layout" with just a center with no columns. Lately I've been trying to play with css grid to port over my previous layouts, but without much luck so far.
The Anti-Hero of CSS Layout – “display:table” (2014)
31–40 of 60 posts
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#32Earlier quoted context omitted.
depending on your audience, most of the time you still can't use flexbox today due to ie9/10. it's really something that after all these years, in 2017, microsoft browsers still find a way to hold back web features.
What audience is that? Who are these people relevant to? Microsoft isn't holding back anything, they can't force these people to update their software. If everyone keeps supporting them, they never will have a reason to update.
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#33The only problem with display:table is that it still requires additional markup to organize elements in tables. Consider this definition list: Term1 Term1 defintion Term2 Term2 defintion and the task of organizing it into two columns table: dt's in first column and dd's in second. Impossible either with display:table & co. or with display flex. At the same time in Sciter[1] I can define that layout as dl { flow: row(…
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#34I never understood why people think the "holy grail layout" is a sticky footer. Do they really have pages with so little content that it's an issue? I have decided for me at least that a fixed footer and header is what I consider my "holy grail layout" with just a center with no columns. Lately I've been trying to play with css grid to port over my previous layouts, but without much luck so far.
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#35Earlier quoted context omitted.
It's called `display: block` - in sake of consistency :)
`display:block` does not define layout model of element content so I suspect it is not an intent of the author. This div { display:block } div > * { display:block; } is closer but still far from ideal: e.g. it will force all tables to lose their display:table; or lists to lose display:list-item; As far as I understand author is looking for div { flow:vertical; } But that's available only in Sciter.
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#36Earlier quoted context omitted.
That is because people who do HTML markup are usually not developers. They are either wannabe developers or just incompetent people hired to reduce costs. They would never waste their time on reading something complicated as W3C standards and understanding concepts like semantic markup.
I'm curious about who read w3c standards, even on HN. I don't. Even MDN (which I consider as fork of w3c for humans) can be quite confusing so let's not judge people on this.
[1] https://www.w3.org/TR/CSS2/visudet.html#Computing_widths_and...
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#37Earlier quoted context omitted.
I'm curious about who read w3c standards, even on HN. I don't. Even MDN (which I consider as fork of w3c for humans) can be quite confusing so let's not judge people on this.
I don't think I've ever actually read the standards and I've been doing this 12 or so years now. I just kind of picked up on what was considered kosher and what wasn't over time. And then when having a "XHTML STRICT" badge in your footer was all the rage, I learned a bit more by having to tweak my code to earn it. imo, there are a lot of different paths to being a good developer. Personally I find scouring over the s…
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#38I never understood why people think the "holy grail layout" is a sticky footer. Do they really have pages with so little content that it's an issue? I have decided for me at least that a fixed footer and header is what I consider my "holy grail layout" with just a center with no columns. Lately I've been trying to play with css grid to port over my previous layouts, but without much luck so far.
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#39The only problem with display:table is that it still requires additional markup to organize elements in tables. Consider this definition list: Term1 Term1 defintion Term2 Term2 defintion and the task of organizing it into two columns table: dt's in first column and dd's in second. Impossible either with display:table & co. or with display flex. At the same time in Sciter[1] I can define that layout as dl { flow: row(…
[1] https://html.spec.whatwg.org/multipage/semantics.html#the-dl...
Re: The Anti-Hero of CSS Layout – “display:table” (2014)
#40Earlier quoted context omitted.
`display:block` does not define layout model of element content so I suspect it is not an intent of the author. This div { display:block } div > * { display:block; } is closer but still far from ideal: e.g. it will force all tables to lose their display:table; or lists to lose display:list-item; As far as I understand author is looking for div { flow:vertical; } But that's available only in Sciter.
I'm not sure I understand what you are trying to achieve differently from regular display:block?
some text
firstsecond
There is no way in CSS at the moment to define content flow of the div above. The only possible way is to define `display` on its children.Say, you want that div to replace content vertically as if all children are blocks and text runs are wrapped into anonymous paragraphs:
some text
first
second
That's impossible in modern CSS without redefining `display` in children. But usually you cannot blindly say div > * { display:block;}
What if some child uses `display:flex` ?Problem is that `display` defines how element is replaced among its siblings. But not how its children are laid out.
At some point it was a proposal to add `display-model` css property. So you can have
div { display: block; display-model:flex | table | etc }
Without it we have ugly semi-solution of combinatorial explosion: div { display: flex; }
div { display: inline-flex; }
div { display: table }
div { display: inline-table; }
div { display: grid; }
div { display: inline-grid; }
...