W3C home > Mailing lists > Public > www-style@w3.org > May 2013

RE: Proposal: Block elements should be able to stack vertically and fill view port

From: François REMY <francois.remy.dev@outlook.com>
Date: Wed, 8 May 2013 19:13:36 +0200
Message-ID: <DUB120-W2060FBB0B5A85DA8AF1528A5BB0@phx.gbl>
To: Axel Dahmen <brille1@hotmail.com>, "www-style@w3.org" <www-style@w3.org>

Thanks for your feedback.

> Currently (CSS3) it doesn't seem to be possible to stack block elements
> vertically in a way so they fit the viewport.

There are multiple ways to solve this already. In your specific case of relative-to-viewport's-height, I would say you could use (calc(100vh - 10em)) to define the heights.

In the more general case, you should be able to use vertical flexboxes or even css grids to do what you want. For example, aligning a div vertically can be done using align properties, which work very well in combination with any of those two layout modes.

Flexbox is already well implemented across browsers, CSS grids still need a bit of implementor's love but that shouldn't take too long before either Google or Mozilla starts working on it ;-) 		 	   		  
Received on Wednesday, 8 May 2013 17:14:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:29 UTC