<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CSS3 Feedback: Layout</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Fri, 19 Mar 2010 00:27:46 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stubbornella &#187; Blog Archive &#187; Overflow &#8211; a secret benefit</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-471921</link>
		<dc:creator>Stubbornella &#187; Blog Archive &#187; Overflow &#8211; a secret benefit</dc:creator>
		<pubDate>Thu, 23 Jul 2009 17:45:09 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-471921</guid>
		<description>[...] an explicit height set, the browsers used the calculated height of the content instead. For more information on clearing, see this conversation Eric Meyer and I had on his [...]</description>
		<content:encoded><![CDATA[<p>[...] an explicit height set, the browsers used the calculated height of the content instead. For more information on clearing, see this conversation Eric Meyer and I had on his [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-444872</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 24 Feb 2009 14:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-444872</guid>
		<description>Adding the properties vertical-center and horizontal-center to the box model would solve the issues of positioning by center, if certain other properties were to override one another according to cascading rules.

Top, height, and bottom would all be considered the same, and override one another while vertical-center is defined, and likewise for left, width, and right for horizontal-center. With any one of these, a height or width can be calculated, and the last one defined should always be the one used for the calculation.</description>
		<content:encoded><![CDATA[<p>Adding the properties vertical-center and horizontal-center to the box model would solve the issues of positioning by center, if certain other properties were to override one another according to cascading rules.</p>
<p>Top, height, and bottom would all be considered the same, and override one another while vertical-center is defined, and likewise for left, width, and right for horizontal-center. With any one of these, a height or width can be calculated, and the last one defined should always be the one used for the calculation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Design - standards based web design, development and training &#187; Some links for light reading (24/2/09)</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-444859</link>
		<dc:creator>Max Design - standards based web design, development and training &#187; Some links for light reading (24/2/09)</dc:creator>
		<pubDate>Tue, 24 Feb 2009 11:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-444859</guid>
		<description>[...] CSS3 Feedback: Layout [...]</description>
		<content:encoded><![CDATA[<p>[...] CSS3 Feedback: Layout [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443816</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Wed, 18 Feb 2009 20:02:04 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443816</guid>
		<description>This (slightly) addresses your concern as to what happens if the do say:

position: absolute;
top: 0;
bottom: 0;
position-anchor-top: 50%;

However, I don&#039;t see an obvious set of defaults if they do:

position-anchor: 50%;

Right now with padding, this would make padding-top = 50%, padding-left = 50%, etc etc.  Since the center of the element can&#039;t be at both the top and the bottom, following suite with how padding and margin turn 1 number into 4 wouldn&#039;t work.

Another issue is that, it wouldn&#039;t make any sense to say:

position: absolute;
top: 0;
bottom: 0;
position-anchor-top: 70%;
position-anchor-bottom: 30%;

So you would have to ensure that the anchoring left value is to the left of the right value.

Or something.  This is getting tricky...</description>
		<content:encoded><![CDATA[<p>This (slightly) addresses your concern as to what happens if the do say:</p>
<p>position: absolute;<br />
top: 0;<br />
bottom: 0;<br />
position-anchor-top: 50%;</p>
<p>However, I don&#8217;t see an obvious set of defaults if they do:</p>
<p>position-anchor: 50%;</p>
<p>Right now with padding, this would make padding-top = 50%, padding-left = 50%, etc etc.  Since the center of the element can&#8217;t be at both the top and the bottom, following suite with how padding and margin turn 1 number into 4 wouldn&#8217;t work.</p>
<p>Another issue is that, it wouldn&#8217;t make any sense to say:</p>
<p>position: absolute;<br />
top: 0;<br />
bottom: 0;<br />
position-anchor-top: 70%;<br />
position-anchor-bottom: 30%;</p>
<p>So you would have to ensure that the anchoring left value is to the left of the right value.</p>
<p>Or something.  This is getting tricky&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443813</link>
		<dc:creator>Benjamin</dc:creator>
		<pubDate>Wed, 18 Feb 2009 19:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443813</guid>
		<description>What about instead of a &#039;position-anchor&#039; property, you set it for each direction:

position-anchor-top: 50%;
position-anchor-right: 10%;

The default would just be the top, bottom left or right of the element.  Then you could make it so you could define all at once, like with padding or margin:

position-anchor: 50% 5px auto auto;</description>
		<content:encoded><![CDATA[<p>What about instead of a &#8216;position-anchor&#8217; property, you set it for each direction:</p>
<p>position-anchor-top: 50%;<br />
position-anchor-right: 10%;</p>
<p>The default would just be the top, bottom left or right of the element.  Then you could make it so you could define all at once, like with padding or margin:</p>
<p>position-anchor: 50% 5px auto auto;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443539</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Wed, 18 Feb 2009 02:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443539</guid>
		<description>&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/?#comment-443521&quot; rel=&quot;nofollow&quot;&gt;Nicole&lt;/a&gt;:

&lt;blockquote&gt;&lt;p&gt;It is a sensible reaction to an element that has no height defined, but has overflow hidden, to set the height equal to the content height.&lt;/p&gt;&lt;/blockquote&gt;

In hindsight, yes.  But when the technique first came up, someone asked me if that was the intended effect.  I thought not, but asked a couple of Working Group members if it was just to be sure.  They said no---then, upon looking again at the relevant part of the spec, said words to the effect of, &quot;Oh, hey, yeah!  That IS what the spec&#039;s wording implies!  It isn&#039;t the case we were trying to cover, but it&#039;s covered nonetheless, so yay us.&quot;

Thus my statement that it wasn&#039;t intended for float wrapping in the first place, but that its utility in that manner was a happy side effect.  I suppose it&#039;s possible that whoever wrote that prose intended that behavior in that case, but if so, apparently it wasn&#039;t shared with the rest of the WG.</description>
		<content:encoded><![CDATA[<p><a href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/?#comment-443521" rel="nofollow">Nicole</a>:</p>
<blockquote><p>It is a sensible reaction to an element that has no height defined, but has overflow hidden, to set the height equal to the content height.</p>
</blockquote>
<p>In hindsight, yes.  But when the technique first came up, someone asked me if that was the intended effect.  I thought not, but asked a couple of Working Group members if it was just to be sure.  They said no&#8212;then, upon looking again at the relevant part of the spec, said words to the effect of, &#8220;Oh, hey, yeah!  That IS what the spec&#8217;s wording implies!  It isn&#8217;t the case we were trying to cover, but it&#8217;s covered nonetheless, so yay us.&#8221;</p>
<p>Thus my statement that it wasn&#8217;t intended for float wrapping in the first place, but that its utility in that manner was a happy side effect.  I suppose it&#8217;s possible that whoever wrote that prose intended that behavior in that case, but if so, apparently it wasn&#8217;t shared with the rest of the WG.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicole Sullivan - Stubbornella</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443521</link>
		<dc:creator>Nicole Sullivan - Stubbornella</dc:creator>
		<pubDate>Wed, 18 Feb 2009 00:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443521</guid>
		<description>I disagree with your statement  &quot;[overflow] wasn&quot;t intended to provide the wrapping effect in the first place.&quot;  

It is a sensible reaction to an element that has no height defined, but has overflow hidden, to set the height equal to the content height. Generally this is my method of choice, but it does have a couple drawbacks.

1. Popups/popovers etc that originate in that block of code may be cropped.
2. Printing will skip chunks of content in some versions of FF (the bits that overflowed the page bounding box on which the overflow:hidden block originated).

Cheers,
Nicole</description>
		<content:encoded><![CDATA[<p>I disagree with your statement  &#8220;[overflow] wasn&#8221;t intended to provide the wrapping effect in the first place.&#8221;  </p>
<p>It is a sensible reaction to an element that has no height defined, but has overflow hidden, to set the height equal to the content height. Generally this is my method of choice, but it does have a couple drawbacks.</p>
<p>1. Popups/popovers etc that originate in that block of code may be cropped.<br />
2. Printing will skip chunks of content in some versions of FF (the bits that overflowed the page bounding box on which the overflow:hidden block originated).</p>
<p>Cheers,<br />
Nicole</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Georg</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443357</link>
		<dc:creator>Georg</dc:creator>
		<pubDate>Tue, 17 Feb 2009 16:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443357</guid>
		<description>Not sure if all cases are covered, but I think the basic &quot;positioning by center&quot; is already more or less solved. At least a quick test [http://www.gunlaug.no/tos/moa_42.html] works ok in all the latest browsers. IE7 and older fail, but IE8rc1 get it right.</description>
		<content:encoded><![CDATA[<p>Not sure if all cases are covered, but I think the basic &#8220;positioning by center&#8221; is already more or less solved. At least a quick test [http://www.gunlaug.no/tos/moa_42.html] works ok in all the latest browsers. IE7 and older fail, but IE8rc1 get it right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Hopkins</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443352</link>
		<dc:creator>James Hopkins</dc:creator>
		<pubDate>Tue, 17 Feb 2009 16:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443352</guid>
		<description>With the release of IE8, the box-sizing feature is now implemented in all four major browsers; Safari (requires vendor prefix), Opera (no prefix needed), Firefox (requires vendor prefix) &amp; IE8 (no prefix needed). 

IMO if MS could have chosen one CSS3 proprerty to implement this was it. Implementing this property in Javscript (which you link to) however, is completely inpractical.</description>
		<content:encoded><![CDATA[<p>With the release of IE8, the box-sizing feature is now implemented in all four major browsers; Safari (requires vendor prefix), Opera (no prefix needed), Firefox (requires vendor prefix) &amp; IE8 (no prefix needed). </p>
<p>IMO if MS could have chosen one CSS3 proprerty to implement this was it. Implementing this property in Javscript (which you link to) however, is completely inpractical.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443316</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Tue, 17 Feb 2009 13:56:28 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443316</guid>
		<description>That sounds interesting, &lt;a href=&quot;http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443223&quot; rel=&quot;nofollow&quot;&gt;Richard&lt;/a&gt;---do you have a more detailed writeup or description I could check out?

I know just how you feel, &lt;a href=&quot;http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443269&quot; rel=&quot;nofollow&quot;&gt;Tao&lt;/a&gt;, though I admit I understand the place from whence that attitude comes---the WG gets a ton of requests to add every idea anyone&#039;s ever had for improving CSS, so they build up some automatic defenses.  &quot;There&#039;s already a way to do that&quot; is one of them.  I get that, but it&#039;s not an acceptable objection and so I thought I&#039;d better address it head-on.

&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443297&quot; rel=&quot;nofollow&quot;&gt;Jake&lt;/a&gt;, are you sure &lt;code&gt;calc()&lt;/code&gt; will work in this case?  I ask because it seems like percentages on offsets would be calculated with respect to the containing block, not the positioned element.  Of course I may have missed something.

&lt;a href=&quot;http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443300&quot; rel=&quot;nofollow&quot;&gt;Bruce&lt;/a&gt;, if you think this post echoes you of three years ago, just wait until you read my next post (which is almost done).</description>
		<content:encoded><![CDATA[<p>That sounds interesting, <a href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443223" rel="nofollow">Richard</a>&#8212;do you have a more detailed writeup or description I could check out?</p>
<p>I know just how you feel, <a href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443269" rel="nofollow">Tao</a>, though I admit I understand the place from whence that attitude comes&#8212;the WG gets a ton of requests to add every idea anyone&#8217;s ever had for improving CSS, so they build up some automatic defenses.  &#8220;There&#8217;s already a way to do that&#8221; is one of them.  I get that, but it&#8217;s not an acceptable objection and so I thought I&#8217;d better address it head-on.</p>
<p><a href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443297" rel="nofollow">Jake</a>, are you sure <code>calc()</code> will work in this case?  I ask because it seems like percentages on offsets would be calculated with respect to the containing block, not the positioned element.  Of course I may have missed something.</p>
<p><a href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443300" rel="nofollow">Bruce</a>, if you think this post echoes you of three years ago, just wait until you read my next post (which is almost done).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bruce</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443300</link>
		<dc:creator>bruce</dc:creator>
		<pubDate>Tue, 17 Feb 2009 12:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443300</guid>
		<description>I feel your pain. &quot; “There are already ways to do that so we don&quot;t need a property” is rather like saying “we can already do layout with tables so why do we need CSS layout?”.&quot;

Indeed. Self-link from Feb 2006: &lt;a href=&quot;http://www.brucelawson.co.uk/2006/are-complex-css-layouts-the-new-nested-tables/&quot; rel=&quot;nofollow&quot;&gt;Epicycles: are complex css layouts the new nested tables?&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I feel your pain. &#8221; “There are already ways to do that so we don&#8221;t need a property” is rather like saying “we can already do layout with tables so why do we need CSS layout?”.&#8221;</p>
<p>Indeed. Self-link from Feb 2006: <a href="http://www.brucelawson.co.uk/2006/are-complex-css-layouts-the-new-nested-tables/" rel="nofollow">Epicycles: are complex css layouts the new nested tables?</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Archibald</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443297</link>
		<dc:creator>Jake Archibald</dc:creator>
		<pubDate>Tue, 17 Feb 2009 11:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443297</guid>
		<description>The positioning by centre thing could be made much easier with &lt;a href=&quot;http://www.w3.org/TR/css3-values/#calc&quot; rel=&quot;nofollow&quot;&gt;the calc function&lt;/a&gt;. At least then you wouldn&#039;t have to use negative margins.

Really enjoying these articles by the way. Hopefully more articles like this will get CSS moving quicker.

Some engines are messing around with complex (and IMO unnecessary) ideas like animation in CSS, I&#039;d be more interested in them experimenting with solutions to common problems like the ones discussed here.

Jake.</description>
		<content:encoded><![CDATA[<p>The positioning by centre thing could be made much easier with <a href="http://www.w3.org/TR/css3-values/#calc" rel="nofollow">the calc function</a>. At least then you wouldn&#8217;t have to use negative margins.</p>
<p>Really enjoying these articles by the way. Hopefully more articles like this will get CSS moving quicker.</p>
<p>Some engines are messing around with complex (and IMO unnecessary) ideas like animation in CSS, I&#8217;d be more interested in them experimenting with solutions to common problems like the ones discussed here.</p>
<p>Jake.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tao Starbo</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443269</link>
		<dc:creator>Tao Starbo</dc:creator>
		<pubDate>Tue, 17 Feb 2009 05:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443269</guid>
		<description>That line you quote about float containment in the original document had such a &quot;let them eat cake&quot; feel to it, it made me question the cluefulness of the entire group.  What do they think they are there for, if not to turn a nasty hack that is used all the time into a specified feature?</description>
		<content:encoded><![CDATA[<p>That line you quote about float containment in the original document had such a &#8220;let them eat cake&#8221; feel to it, it made me question the cluefulness of the entire group.  What do they think they are there for, if not to turn a nasty hack that is used all the time into a specified feature?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Grevers</title>
		<link>http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comment-443223</link>
		<dc:creator>Richard Grevers</dc:creator>
		<pubDate>Mon, 16 Feb 2009 20:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/?p=1043#comment-443223</guid>
		<description>Something I have always wanted is an &lt;em&gt;expand&lt;/em&gt; property for floated boxes - so that if a neighouring float should drop, leaving the box with the property set as the rightmost (or leftmost), it will expand to take up the remaining room. That would make some fluid layouts work much better on small displays. (In my view, it&#039;s not the end of the world if a float drops, it&#039;s what they are meant to do. I&#039;d rather have some content vertically out-of-place than squished to uselessness.</description>
		<content:encoded><![CDATA[<p>Something I have always wanted is an <em>expand</em> property for floated boxes &#8211; so that if a neighouring float should drop, leaving the box with the property set as the rightmost (or leftmost), it will expand to take up the remaining room. That would make some fluid layouts work much better on small displays. (In my view, it&#8217;s not the end of the world if a float drops, it&#8217;s what they are meant to do. I&#8217;d rather have some content vertically out-of-place than squished to uselessness.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head profile="http://gmpg.org/xfn/1">
<title>meyerweb.com</title>
<link rel="openid.server" href="http://www.myopenid.com/server">
<link rel="openid.delegate" href="http://emeyer.myopenid.com/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="shortcut icon" href="/favicon.ico"><link rel="home" href="http://meyerweb.com/" title="Home" ><link rel="stylesheet" href="http://meyerweb.com/ui/meyerweb.css" type="text/css" media="screen, projection"><link rel="stylesheet" href="http://meyerweb.com/ui/theme.css" type="text/css" media="screen, projection" id="themeLink"><link rel="stylesheet" href="http://meyerweb.com/ui/print.css" type="text/css" media="print"><script src="http://meyerweb.com/ui/addresses.js" type="text/javascript"></script><link rel="stylesheet" href="/ui/wordpress.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/tfe.css" type="text/css" media="screen">
<link rel="stylesheet" href="/ui/home.css" type="text/css" media="screen">
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric" href="/eric/thoughts/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only technical posts)" href="/eric/thoughts/category/tech/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Thoughts From Eric (only personal posts)" href="/eric/thoughts/category/personal/rss2/full" />
<link rel="alternate" type="application/rss+xml" title="Distractions" href="/eric/thoughts/recent-links/rss2" />
<link rel="alternate" type="application/rss+xml" title="Excuse of the Day" href="/feeds/excuse/rss20.xml" />
</head>
<body id="www-meyerweb-com" class="hpg">

<div id="sitemast"><h1><a href="/"><span>meyerweb</span>.com</a></h1></div><div id="search"><h4>Exploration</h4><!-- SiteSearch Google --><form method="get" action="http://www.google.com/custom" target="_top"><div><input type="hidden" name="domains" value="meyerweb.com"></input><label for="sbb" style="display: none">Submit search form</label><input type="submit" name="sa" value="Google Search" id="sbb"></input><label for="sbi" style="display: none">Enter your search terms</label><input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input><p><input type="radio" name="sitesearch" value="meyerweb.com" checked id="ss1"></input><label for="ss1" title="Search meyerweb.com">meyerweb.com</label><input type="radio" name="sitesearch" value="" id="ss0"></input><label for="ss0" title="Search the Web">Web</label></p><input type="hidden" name="client" value="pub-3772084027748653"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="safe" value="active"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input><input type="hidden" name="hl" value="en"></input></div></form><!-- SiteSearch Google --><!-- <form method="get" action="http://www.google.com/custom"><div><input type="submit" name="sa" value="Search"><input type="text" name="q" size="20" maxlength="255" value=""><input type="hidden" name="sitesearch" value="meyerweb.com"></div></form><small><a href="http://www.google.com/search">Powered by Google</a></small> --></div><div id="main"><div class="skipper">Skip to: <a href="#extra">site navigation/presentation</a></div><div class="skipper">Skip to: <a href="#thoughts">Thoughts From Eric</a></div>
<div id="thoughts">


<div class="entry">
<h3><a href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/" rel="bookmark" title="Permanent Link: CSS3 Feedback: Layout">CSS3 Feedback: Layout</a></h3>
<ul class="meta">
<li class="date">Mon 16 Feb 2009</li>
<li class="time">1201</li>
<li class="cat"><a href="http://meyerweb.com/eric/thoughts/category/tech/css/" title="View all posts in CSS" rel="category tag">CSS</a><br> <a href="http://meyerweb.com/eric/thoughts/category/commentary/" title="View all posts in Commentary" rel="category tag">Commentary</a><br> <a href="http://meyerweb.com/eric/thoughts/category/tech/standards/" title="View all posts in Standards" rel="category tag">Standards</a><br> <a href="http://meyerweb.com/eric/thoughts/category/tech/w3c/" title="View all posts in W3C" rel="category tag">W3C</a><br> <a href="http://meyerweb.com/eric/thoughts/category/tech/web/" title="View all posts in Web" rel="category tag">Web</a></li>
<li class="cmt"><a href="http://meyerweb.com/eric/thoughts/2009/02/16/css3-feedback-layout/#comments">14 responses</a></li>
<li></li><li></li></ul>

<div class="text">
<p class="aside">(This is part of the <a href="http://meyerweb.com/eric/thoughts/2009/02/11/feedback-on-wasp-community-css3-feedback-2008/">Feedback on &#8216;WaSP Community CSS3 Feedback 2008&#8242;</a> series.)</p>
<p>
In this round, <a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#layout">layout</a>.  Not all of it, but the bits that struck me as either really useful or really, really way too long overdue.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#contain-floats">Float containment</a> &#8211;</strong> yes, we need a property that does just that.  As long as we&#8217;re tied to floats for layout&#8212;and I plan to rant about that soon&#8212;there should be a clear, unambiguous, intentionally defined property that tells elements to wrap themselves around floated descendant elements.  <code>overflow</code> works in most cases but can fall down in unusual circumstances (I&#8217;ve seen scrollbars appear where none were actually needed) and anyway, it wasn&#8217;t intended to provide the wrapping effect in the first place.  That it does so is a happy side effect, but it&#8217;s still a side effect.  The rest of the float-wrapping techniques are even more convoluted.  &#8220;There are already ways to do that so we don&#8217;t need a property&#8221; is rather like saying &#8220;we can already do layout with tables so why do we need CSS layout?&#8221;.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#center-positioning">Positioning by center</a> &#8211;</strong> yes, please.  The way to center an absolutely positioned element within its containing block is to set the <code>top</code> and <code>left</code> to <code>50%</code> each and then define negative top and left margins that are half the positioned element&#8217;s height and width.  That&#8217;s just awful, and requires at least an explicit width, if not an explicit height.  When I did the structured timeline, here&#8217;s how I got the version numbers to center below the dots:
</p>

<pre>#timeline tbody td p {
	position: absolute;
	top: 50%;
	width: 2.1em;
	margin: -5px 0 0 -1em;
}
</pre>

<p>
See that <code>-1em</code> left margin, and the <code>2.1em</code> width?  Just to get the center of positioned elements&#8217; boxes sit on top of a certain left offset (defined elsewhere in the CSS).  Ditto the negative top margin, to pull it upward just enough so that the elements&#8217; boxes would have the point five pixels down from their tops line up with the vertical midpoint of their containing blocks.
</p>
<p>
I wanted to do something like this:
</p>

<pre>#timeline tbody td p {
	position: absolute;
	top: 50%;
	position-anchor: 50% 5px;
}
</pre>

<p>
That would have said that the point in the center of the absolutely positioned element should be placed at the point in the containing block 21.7% down from the top and 44% of the way across from the left.  That would hang the positioned element&#8217;s center on that point, <em>regardless of the size of the positioned element</em>&#8212;note that I took out the <code>width</code>.  I could stop defining explicit sizes and just let the elements be the size they want to be to show their content.
</p>
<p>
The problem is that approach doesn&#8217;t fit at all well with the way positioning layout is defined.  Suppose I said this:
</p>

<pre>#timeline tbody td p {
	position: absolute;
	top: 50%; bottom: 0;
	left: 50%; right: 25%;
	position-anchor: 50% 5px;
}
</pre>

<p>
Now what?  I&#8217;m not even sure myself.  Maybe define rename it to <code>position-offset</code> and define percentages to be relative to the height and width of the positioned element (not its containing block), so that it doesn&#8217;t interact directly with the offset properties like <code>top</code> and <code>right</code>?
</p>
<p>
All I want is a way to hang elements off of offset points, and not be restricted to the corners of the elements, and have the solution work even when the elements have automatic height and width, and not require extra markup to make it happen.  Oh, and a ponycar.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#box-sizing">Box sizing</a> &#8211;</strong> what in the nine hells of Valeria is taking so long?  We needed that one ten years ago.  I no longer care if it&#8217;s done as its own property or as new keywords on <code>height</code> and <code>width</code>.  I just want it.  Someone will make it happen, with or without the WG or implementors&#8212;<a href="http://meyerweb.com/eric/thoughts/2008/10/22/javascript-will-save-us-all/">mark my words</a>.
</p>
<p>
<strong><a href="http://fantasai.inkedblade.net/style/discuss/wasp-feedback-2008#siblings-equal-height">Same-height elements</a> &#8211;</strong> yes, a way to tie element heights (whether they&#8217;re siblings or not) together would be welcome, although I can see how specifying it in an implementable would be tricky; no, <code>display: table-cell</code>  is <em>not</em> the answer.  Soon I will rant about this.  Soon.
</p>
</div>

</div>

</div>
<p style="font-size: 90%; text-align: right; margin-top: 0.5em; padding-top: 0;">(If you care, there's even an <a href="/eric/thoughts/page/2/">archive of previous thoughts</a>...)</p>

</div><div id="extra"><div class="panel" id="archipelago"><h4>Identity Archipelago</h4><ul><li><a href="http://flickr.com/photos/meyerweb/" rel="me">Flickr</a></li><li><a href="http://twitter.com/meyerweb/" rel="me">Twitter</a></li><li><a href="http://dopplr.com/traveller/meyerweb">Dopplr</a></li><li><a href="http://www.linkedin.com/in/meyerweb" rel="me">LinkedIn</a></li><li><a href="http://technorati.com/profile/emeyer" rel="me">Technorati</a></li></ul></div><div class="panel" id="pointers"><h4>Projects Elsewhere</h4><ul><li><a href="http://aneventapart.com/">An Event Apart</a></li><li><a href="http://complexspiral.com/">Complex Spiral Consulting</a></li><li><a href="http://www.webassist.com/go/css/emeyer/">CSS Sculptor</a></li><li><a href="http://css-discuss.org/">css-discuss</a></li><li><a href="http://microformats.org/">Microformats</a></li><li><a href="http://s5project.org/">S5</a></li></ul></div><div class="panel" id="tour"><ul><li><a href="http://fray.com/issue3/"><img src="http://fray.com/images/i3c.gif" alt="Fray Contributor (Issue 3: Sex &amp; Death)" /></a></li><!-- <li><a href="http://www.webassist.com/go/css/emeyer/"><img src="/pix/CS_ad_180x109.jpg" alt="CSS Sculptor for Dreamweaver" style="max-width: 100%;" /></a></li> --></ul></div><div class="panel">
<h4>Recently Tweeted</h4>
<p class="more"><a href="http://twitter.com/meyerweb">see more</a></p>
<p>Now that Congress has passed health insurance reform, is there any sign they're thinking about reforming health care as well? <small>&#8211;tweeted 4 hours, 28 minutes ago</small></p>
</div><div id="sideblog" class="panel">
<h4>Distractions</h4>
<p class="more">
<a href="/eric/thoughts/recent-links/">archive</a>
</p>
<ul>
<li><a href="http://tweetagewasteland.com/2010/03/my-head-is-in-the-cloud/" title="March 18 | &#8220;I sense that my addiction to the realtime stream is only making room for the consumption of a faster stream.&#8221;">My Head is in the Cloud</a> <small>[via <a href="http://daringfireball.net/">John</a>]</small></li>
<li><a href="http://8bitnyc.com/" title="March 17 | All of a sudden I want to establish a mission in Central Park and negotiate with the natives for gold and food.">8-Bit NYC</a></li>
<li><a href="http://www.youtube.com/watch?v=nFicqklGuB0&amp;feature=player_embedded" title="March 12 | Wry comment expressing my appreciation of the creative derivativeness of this video and its uncanny accuracy in mocking common tropes.">Academy Award Winning Movie Trailer</a></li>
<li><a href="http://www.youtube.com/watch?v=414TmP12WAU" title="March 9 | &#8220;Apple juice&#8230; for half price!&#8221;  More like twice PRICELESS.  (Note: If you&#8217;re at work, don your headphones.)">Happy in Paraguay</a> <small>[via <a href="http://unstoppablerobotninja.com/">Ethan</a>]</small></li>
<li><a href="http://www.youtube.com/watch?v=9V5ubAOeOBk&amp;feature=player_embedded" title="February 10 | This is approximately the best thing ever.">U900 -Walk Don&#8217;t Run (Isogabamaware)</a></li>
<li><a href="http://www.456bereastreet.com/archive/201002/sifr_default_css_hides_content_from_at_least_one_screen_reader/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A 456bereastreet %28456 Berea Street%29" title="February 8 | -9999px comes through again, but I really wish we were beyond that kind of thing.">sIFR default CSS hides content from at least one screen reader</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20100117064356428" title="February 8 | Storing this for future use.">Take a picture with the iSight camera when a folder is opened</a></li>
<li><a href="http://mingle2.com/blog/view/web-developer-mind" title="February 4 | Mostly valid.  (SEE WHAT I DID THERE?)">The Mind of a Web Developer: An Illustrated Diagram</a></li>
<li><a href="http://www.theonion.com/content/news/science_channel_refuses_to_dumb" title="January 28 | &#8220;Punkin Chunkin, for Christ&#8217;s sake&#8230; What more do you people want?&#8221;">Science Channel Refuses To Dumb Down Science Any Further</a></li>
<li><a href="http://www.mailchimp.com/blog/project-omnivore-declassified/" title="January 27 | Sounds like quite a feat.  But I wonder how we&#8217;d feel if Microsoft or Google announced the same kind of thing on their e-mail services.">MailChimp&#8217;s Project Omnivore: Declassified</a></li>
<li><a href="http://www.politifact.com/truth-o-meter/statements/2010/jan/25/carolyn-maloney/congresswoman-says-democratic-presidents-create-mo/" title="January 26 | &#8220;Obviously, luck matters a lot, but when there is a consistent pattern over more than 60 years, it starts to look like more than just luck.&#8221;">Congresswoman says Democratic presidents create more private-sector jobs</a></li>
<li><a href="http://www.ted.com/talks/taylor_mali_what_teachers_make.html" title="January 25 | Truth.">Taylor Mali: What teachers make</a></li>
<li><a href="http://notebook.johnmartz.com/how-websites-work?c=1" title="January 22 | At last, the truth is out and I can stop pretending:  beatific monkeys are what makes it all go.">How websites work</a></li>
</ul>
</div>
<div class="panel" id="advisory">
<div class="guarded">
<a href="http://blogadvisorysystem.com/"><img src="/pix/bas/guarded.png" alt="Blog Advisory System Alert Level: Guarded"></a>
</div>
</div>

<div class="panel" id="excuse">
<h4>The <a href="/feeds/excuse/">excuse of the day</a> is</h4>
<p>Republicans</p>
</div>

<div class="panel" id="extras">
<h4>Extras</h4>
<ul>
<li><a href="/feeds/">Feeds</a> &#8226;</li>
<li><a href="/eric/faq.html">FAQ</a> &#8226;</li>
<li><a href="/family.html">Family</a></li>
</ul>
</div>

</div>

<div id="navigate">
<h4>Navigation</h4>
<ul id="navlinks">
<li id="archLink"><a href="/eric/thoughts/">Archives</a></li>
<li id="cssLink"><a href="/eric/css/">CSS</a></li>
<li id="toolsLink"><a href="/eric/tools/">Toolbox</a></li>
<li id="writeLink"><a href="/eric/writing.html">Writing</a></li>
<li id="speakLink"><a href="/eric/talks/">Speaking</a></li>
<li id="otherLink"><a href="/other/">Leftovers</a></li>
<li id="aboutsite"><a href="/ui/about.html">About this site</a></li>
</ul>
</div>

<div id="footer">
<p class="sosumi">All contents of this site, unless otherwise noted, are &copy;1995-2008 <strong>Eric A. and Kathryn S. Meyer</strong>.  All Rights Reserved.</p>
<p>"<a href="/eric/thoughts/">Thoughts From Eric</a>" is powered by the &uuml;bercool <a href="http://wordpress.org/">WordPress</a></p>
</div>
</body>
</html>
