html - IE overlapping flexbox when media sizing the page -


i using flexbox displaying variety of items layout change based on screen size in order function on devices. in chrome, displays expected, ie overlapping when going largest size medium size screen. i've managed replicate in jsfiddle.

fiddle: https://jsfiddle.net/c7xmfyd3/5/

span { display: inline-flex; } .max-width { width: 100%; }  #canvasmap { height: 288pt; width: 288pt; margin: 0pt; padding: 0pt; }  .box { border: 0.75pt solid #aaaaaa; margin: 0pt 5pt 11pt 0pt; flex:auto; } .box { -moz-border-radius-topright: 4pt; -moz-border-radius-topleft: 4pt; -webkit-border-top-right-radius: 4pt; -webkit-border-top-left-radius: 4pt; border-top-left-radius: 4pt; border-top-right-radius: 4pt; box-shadow: 0pt 2.2pt 4pt #aaaaaa; }     .box .content { padding: 0pt 4pt 0pt 4pt; }     .box .title { background: #0094ff; color: white; padding: 4pt; font-variant: small-caps; -moz-border-radius-topright: 4pt; -moz-border-radius-topleft: 4pt; -webkit-border-top-right-radius: 4pt; -webkit-border-top-left-radius: 4pt; border-top-left-radius: 4pt; border-top-right-radius: 4pt; }     .box p { color: #333; padding: 7.2pt; }  .metricbox { border: 0.75pt solid; width: 72pt; height: 49pt; margin: 2pt; display: inline-block; position: relative; } .metricbox { -moz-border-radius-topright: 4pt; -moz-border-radius-topleft: 4pt; -webkit-border-top-right-radius: 4pt; -webkit-border-top-left-radius: 4pt; border-top-left-radius: 4pt; border-top-right-radius: 4pt; -moz-border-radius-bottomright: 4pt; -moz-border-radius-bottomleft: 4pt; -webkit-border-bottom-right-radius: 4pt; -webkit-border-bottom-left-radius: 4pt; border-bottom-left-radius: 4pt; border-bottom-right-radius: 4pt; }     .metricbox .content { text-align: center; font-weight: bold; font-size: 15pt; padding: 3pt; }     .metricbox .item { font-size: 8pt; color: black; font-weight: bold; text-transform: uppercase; width: 100%; text-align: center; position: absolute; bottom: 0; }  .mb-base { border-color: black; color: black; } .mb-good { border-color: #339933; color: #339933; } .mb-bad { border-color: #ff0000; color: #ff0000; } .mb-test { border-color: #e18412; color: #e18412; }  /*used modify display screen sizes change*/ .flex-123, .flex, .flex-12, .flex-3, .flex-stack { display: flex; align-items: stretch; } .flex-3 { align-content:flex-start; } .flex-stack { flex-direction: column; }  /*media widths originally:  450, 650, 758, 900, 978px...converted pt @ 100px = 72pt */ @media screen , (min-width: 72pt) {     #canvasmap { width: inherit; }     .flex-123 { flex-direction: column; }     .flex-12 { flex-direction: column; }     .flex-3 { flex-direction: column; } }  /*@media screen , (min-width: 758px) {*/ @media screen , (min-width: 432pt) {     #canvasmap { width: 288pt; }     .flex-123 { flex-direction: column; }     .flex-12 { flex-direction: row; }     .flex-3 { flex-direction: row; } }  @media screen , (min-width: 710pt) {     #suppliermetrics { min-width: 168pt; }     .flex-123 { flex-direction: row; }     .flex-12 { flex-direction: row; }     .flex-3 { flex-direction: row;  } } 

i've attempted variety of flex settings recommended in research, no luck.

any feedback appreciated.

after extensive trial , error, i've resolved issue ie behaves desired , seen in chrome. css needed minor tweaking along additional child flex container (flex-1) added , renaming flex flex-2.

the conflict occurred because of fixed widths being set #canvasmap , #suppliermetrics. ie not able accurately determine sizing flex containers. when sizing defined flex containers (flex-1 & flex-2), ie seems work desired.


summary of changes:

there 3 main flex blocks: flex-1, flex-2, , flex-3. additional container exists (flex-12) wraps around flex-1 , flex-2. outer flex container flex-123. flex block (flex-12) updated each child item defined own flex container.

  • flex container (flex-1) added.
  • flex container 'flex' renamed 'flex-2'.
  • three main flex blocks (flex-1, flex-2, flex-2_ defined flex-direction: row
  • css: #canvasmap width changed 288pt 'inherit.' in doing so, min-width flex-1 set middle screen size , 'unset' smallest screen size.
  • the flex container flex-12 width set 'auto' on largest screen size
  • the flex container flex-3 width set 100% on largest screen size
  • the middle flex block (flex-2) has min-width of 168pt largest screen size , 'unset' middle size screen

fiddle resolution: https://jsfiddle.net/c7xmfyd3/6/

/*#canvasmap { height: 288pt; width: 288pt; margin: 0pt; padding: 0pt; }*/ #canvasmap { height: 288pt; width: inherit; margin: 0pt; padding: 0pt; }   /*used modify display screen sizes change*/ /*.flex-123, .flex, .flex-12, .flex-3, .flex-stack { display: flex; align-items: stretch; }*/ /*.flex-3 { align-content:flex-start; }*/ .flex-123,  .flex-12, .flex-2, .flex-3, .flex-stack { display: flex; align-items: stretch; } .flex-1, .flex-2, .flex-3 { flex-direction: row; } .flex-stack { flex-direction: column; }   /*media widths originally:  450, 650, 758, 900, 978px...converted pt @ 100px = 72pt */ @media screen , (min-width: 72pt) {     /*#canvasmap { width: inherit; }*/     .flex-123 { flex-direction: column; }     .flex-12 { flex-direction: column; }     .flex-3 { flex-direction: column; }     .flex-1 { min-width: unset; } }   @media screen , (min-width: 432pt) {    /*#canvasmap { width: 288pt; }*/     .flex-123 { flex-direction: column; }     .flex-12 { flex-direction: row; }     .flex-1 { min-width: 288pt; }     .flex-2 { min-width: unset; }     /*.flex-3 { flex-direction: row; }*/ }  @media screen , (min-width: 710pt) {     /**#suppliermetrics { min-width: 168pt; }*/      .flex-123 { flex-direction: row; }     .flex-12 { flex-direction: row; }     /*.flex-3 { flex-direction: row;  }*/     .flex-12 { width: auto; }     .flex-3 { width: 100%; }     .flex-2 { min-width: 168pt; } } 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -