Announcement

Collapse
No announcement yet.

css flex family of properties

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    css flex family of properties

    Quite a bit of the resonsive designs in v14 appear ti have been built using the flex family of styles. http://www.w3schools.com/cssref/css3_pr_flex.asp

    This method seems, however, not to work in firefox. I know many mobile devices do not primarily use FF as a browser although it is an option on iOs and android. Even the ZTE Firefox phone does not use FF as a default browser. It is worth bearing this in mind when using the FF developer tools responsive view.

    I was having a play with flex to be able to custom edit some layouts and here is wher I am so far. Any suggestions on improvement welcome. The Media queries are a bit of a dogs dinner but they seem to work.
    CSS
    Code:
    .jc-container {
    	float:left;
    	width:100%;
    	margin:0 0 1%;
    	padding:1%;
    
      display: -webkit-box;
      display: -moz-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      
      -webkit-flex-flow: row wrap;
      justify-content: space-around;
    }
    
    .jcSection {	
    	border: 1px solid red;
    	float:left;
    	width:98%;
    	display:-webkit-flex;
    	display:-moz-flex;
    	display:flex;
    	-webkit-flex-flow:row wrap;
    	-moz-flex-flow:row wrap;
    	flex-flow:row wrap;
    	/* Start of IE Flex box */
    	display: -ms-flexbox !important;
      -ms-flex-direction: row !important;
      -ms-flex-wrap:wrap !important;
      /* End of IE Flex box */
    }
    
    .jcSection2 {
    	border: 1px solid red;
    	-webkit-flex:0 0 45%;
    	-moz-flex:0 0 45%;
    	flex:0 0 45%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:45%;
    	width:45%;
    	/* End of IE Flex box */
    	margin:1% auto;
    }
    
    .jcSection3 {
    	border: 1px solid red;
    	-webkit-flex:0 0 30%;
    	-moz-flex:0 0 30%;
    	flex:0 0 30%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:30%;
    	width:30%;
    	/* End of IE Flex box */
    	margin:1% auto;
    }
    
    .jcSection4 {
    	border: 1px solid red;
    	-webkit-flex:0 0 23%;
    	-moz-flex:0 0 23%;
    	flex:0 0 23%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:23%;
    	width:23%;
    	/* End of IE Flex box */
    	margin:1% auto;
    }
    
    .jc-container img, .jc-container.jcSection2 img, .jc-container.jcSection3 img, .jc-container.jcSection4 img {max-width:100%!Important;height:auto; max-height:inherit;}
    
    /* #### Desktops #### */
    @media screen and (min-width: 1024px){
    .jc-container {
    	float:left;
    	width:100%;
    	margin:0 0 1%;
    	padding:1%;
      list-style: none;
      
      display: -webkit-box;
      display: -moz-box;
      display: -ms-flexbox;
      display: -webkit-flex;
      display: flex;
      
      -webkit-flex-flow: row wrap;
      justify-content: space-around;
    }
    
    .flex-item {
      background: tomato;
      padding: 5px;
      width: 200px;
      height: 150px;
      margin-top: 10px;
      
      line-height: 150px;
      color: white;
      font-weight: bold;
      font-size: 3em;
      text-align: center;
    }
    
    .jcSection {	
    	border: 1px solid red;
    	float:left;
    	width:98%;
    	display:-webkit-flex;
    	display:-moz-flex;
    	display:flex;
    	-webkit-flex-flow:row wrap;
    	-moz-flex-flow:row wrap;
    	flex-flow:row wrap;
    	/* Start of IE Flex box */
    	display: -ms-flexbox !important;
      -ms-flex-direction: row !important;
      -ms-flex-wrap:wrap !important;
      /* End of IE Flex box */
    }
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 45%;
    	-moz-flex:0 0 45%;
    	flex:0 0 45%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:45%;
    	width:45%;
    	/* End of IE Flex box */
    	margin:1% auto;
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 30%;
    	-moz-flex:0 0 30%;
    	flex:0 0 30%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:30%;
    	width:30%;
    	/* End of IE Flex box */
    	margin:1% auto;
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 23%;
    	-moz-flex:0 0 23%;
    	flex:0 0 23%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:23%;
    	width:23%;
    	/* End of IE Flex box */
    	margin:1% auto;
    }
    }
    
    /* #Tablet (Portrait)
    ================================================== */
    
    /* Note: Design for a width of 768px */
    
    @media only screen and (min-width: 768px) and (max-width: 959px) {
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    	
    }
    
    /*  #Mobile (Portrait)
    ================================================== */
    
    @media only screen and (max-width: 767px), @media screen and (max-device-width: 480px) and (orientation: portrait){
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /* #Mobile (Landscape)
    ================================================== */
    
    /* Note: Design for a width of 480px */
    
    @media only screen and (min-width: 480px) and (max-width: 767px), @media screen and (max-device-width: 640px) and (orientation: landscape){
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    
    /* #### Mobile Phones Portrait or Landscape #### 
    ================================================== */
    @media screen and (max-device-width: 640px), @media screen and (max-device-width: 414px){
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /* #### iPhone 4+ Portrait or Landscape ####  
    ================================================== */
    @media screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2){
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /* #### Tablets Portrait or Landscape ####  
    ================================================== */
    @media screen and (min-device-width: 768px) and (max-device-width: 1024px){
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 45%;
    	-moz-flex:0 0 45%;
    	flex:0 0 45%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:45%;
    	width:45%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 30%;
    	-moz-flex:0 0 30%;
    	flex:0 0 30%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:30%;
    	width:30%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 23%;
    	-moz-flex:0 0 23%;
    	flex:0 0 23%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:23%;
    	width:23%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /*=== New iPhone Stuff ===*/
    
    /*– iPhone 5, iPod Touch 5Gen–  
    ================================================== */
    @media only screen and (-webkit-min-device-pixel-ratio: 2) and (max-device-width:1136px) {
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /*– iPhone 5, iPod Touch 5Gen– landscape 
    ================================================== */
    @media only screen and (-webkit-min-device-pixel-ratio: 2) and (max-device-width:1136px) and (orientation : landscape) {
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /*– iPhone 4, 4S, 5, iPod Touch 4Gen, 5Gen–  Portrait
    ================================================== */
    @media only screen and (-webkit-min-device-pixel-ratio: 2) and (max-device-width:640px) and (orientation : portrait) {
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /*iPhone 6 (Standard View) and iPhone 6 Plus (Zoom View):  
    ================================================== */
    @media screen and (max-device-width: 375px) and (max-device-height: 667px) {
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    
    }
    
    /*iPhone 6 Plus (Standard View):  
    ================================================== */
    @media screen and (max-device-width: 414px) and (max-device-height: 776px) {
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /*iPhone 6 (Zoom View):  
    ================================================== */
    @media screen and (max-device-width: 320px) and (max-device-height: 568px) {
    
    .jcSection2 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection3 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    .jcSection4 {
    	
    	-webkit-flex:0 0 100%;
    	-moz-flex:0 0 100%;
    	flex:0 0 100%;
    	/* Start of IE Flex box */
    	-ms-flex-grow:0;
    	-ms-flex-shrink:0;
    	-ms-flex-basis:100%;
    	width:100%;
    	/* End of IE Flex box */
    	
    }
    
    }
    
    /*=== New iPhone Stuff ENDS ===*/
    
    /* #Clearing
    ================================================== */
    
        /* Self Clearing Goodness */
        .container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
    
        /* Use clearfix class on parent to clear nested columns,
        or wrap each row of columns in a <div class="row"> */
        .clearfix:before,
        .clearfix:after,
        .row:before,
        .row:after {
          content: '\0020';
          display: block;
          overflow: hidden;
          visibility: hidden;
          width: 0;
          height: 0; }
        .row:after,
        .clearfix:after {
          clear: both; }
        .row,
        .clearfix {
          zoom: 1; }
    
        /* You can also use a <br class="clear" /> to clear columns */
        .clear {
          clear: both;
          display: block;
          overflow: hidden;
          visibility: hidden;
          width: 0;
          height: 0;
        }
    html
    Code:
    <p>xxx</p>
    <div class="jc-container">
      <div class="jcSection2">1 <img src="tulips600.jpg" alt="Tulips" width="600" height="333" /></div>
      <div class="jcSection2">2</div>
    </div>
    <p>xxx</p>
    <div class="jc-container">
      <div class="jcSection">1 <img src="tulips600.jpg" alt="Tulips" width="600" height="333" /></div>
    </div>
    <p>xxx</p>
    <div class="jc-container">
      <div class="jcSection3">1 <img src="tulips600.jpg" alt="Tulips" width="600" height="333" /></div>
      <div class="jcSection3">2</div>
      <div class="jcSection3">3</div>
    </div>
    <p>xxx</p>
    <div class="jc-container">
      <div class="jcSection4">1 <img src="tulips600.jpg" alt="Tulips" width="600" height="333" /></div>
      <div class="jcSection4">2</div>
      <div class="jcSection4">3</div>
      <div class="jcSection4">4</div>
    </div>
    [BImage[/B]

    URL
    www.graphicz.gb.com/flex/

    Thanks for looking and advice.
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    However...

    If you use the 'Holy Grail' layout - https://developer.mozilla.org/en-US/...Flexible_boxes

    It works a treat - more studying to be done!

    Code:
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <style>
    
      body {
       font: 24px Helvetica;
       background: #999999;
      }
    
      #main {
       min-height: 800px;
       margin: 0px;
       padding: 0px;
       display: -webkit-flex;
       display:         flex;
       -webkit-flex-flow: row;
               flex-flow: row;
       }
     
      #main > article {
       margin: 4px;
       padding: 5px;
       border: 1px solid #cccc33;
       border-radius: 7pt;
       background: #dddd88;
       -webkit-flex: 3 1 60%;
               flex: 3 1 60%;
       -webkit-order: 2;
               order: 2;
       }
      
      #main > nav {
       margin: 4px;
       padding: 5px;
       border: 1px solid #8888bb;
       border-radius: 7pt;
       background: #ccccff;
       -webkit-flex: 1 6 20%;
               flex: 1 6 20%;
       -webkit-order: 1;
               order: 1;
       }
      
      #main > aside {
       margin: 4px;
       padding: 5px;
       border: 1px solid #8888bb;
       border-radius: 7pt;
       background: #ccccff;
       -webkit-flex: 1 6 20%;
               flex: 1 6 20%;
       -webkit-order: 3;
               order: 3;
       }
     
      header, footer {
       display: block;
       margin: 4px;
       padding: 5px;
       min-height: 100px;
       border: 1px solid #eebb55;
       border-radius: 7pt;
       background: #ffeebb;
       }
     
      /* Too narrow to support three columns */
      @media all and (max-width: 640px) {
      
       #main, #page {
        -webkit-flex-flow: column;
                flex-direction: column;
       }
    
       #main > article, #main > nav, #main > aside {
        /* Return them to document order */
        -webkit-order: 0;
                order: 0;
       }
      
       #main > nav, #main > aside, header, footer {
        min-height: 50px;
        max-height: 50px;
       }
      }
    
     </style>
      </head>
      <body>
     <header>header</header>
     <div id='main'>
        <article>article</article>
        <nav>nav</nav>
        <aside>aside</aside>
     </div>
     <footer>footer</footer>
      </body>
    </html>
    URLhttp://www.graphicz.gb.com/flex/holy-grail.html
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    Comment


      #3
      Perfect Solution

      This is a gem:

      https://dev.opera.com/articles/advan...owser-flexbox/

      and the example to download:

      https://dev.opera.com/articles/advan...ox/case-study/

      If you extrapolate the styling and code to three or four columns it is great for brochure fragment lists and section lists if you want something custom.
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment

      Working...
      X