[css3-flexbox] about flexible margins and alignment

Here is practical situation that we have, consider this markup
<div #item-actions>
   <button>Send</button>
   <button>Delete</button>
</div>

And the style we use:

#item-actions { 
   flow: horizontal;
   width:*;
   height:30px;
} 
#item-actions button
{
     width: max-intrinsic;
     margin:*; 
}

This will position buttons in a row like this: 

|<---><button><---><button><--->|

Where <---> parts are equal to each other and depend
on width of #item-actions container. flow: horizontal;
in our case applies horizontal margin collapsing so
total sum of flexes in horizontal direction is 3. 

Question is: how this pretty common layout can be
achieved with flex-box? If this is possible at all of course.

-- 
Andrew Fedoniouk

http://terrainformatica.com

Received on Tuesday, 13 December 2011 02:42:26 UTC