This code works as expected on computer but totally fails to render the display: flex
on both Chrome 47 for iPad and Safari for iPad (in landscape view, width 1024px).
It's strange because flex
should be well supported on Chrome since a long time.
* { margin: 0; padding: 0; }
#header { height: 60px; display: -webkit-flex; display: flex; }
#topleft { flex: 0 0 155px; height: 100%; background-color: green; }
#topmid { flex: 0 0 40%; height: 100%; background-color: blue; }
#topright { flex: 1; background-color: yellow; }
<div id="header">
<div id="topleft">Topleft</div>
<div id="topmid">Topmid</div>
<div id="topright">Topright</div>
</div>
What's wrong?
The flexbox properties are supported in all modern browsers.
Safari versions 9 and up support the current flexbox spec without prefixes. Older Safari versions, however, require -webkit- prefixes. Sometimes min-width and max-width cause alignment problems which can be resolved with flex equivalents. See Flex items not stacking properly in Safari.
If you're having trouble activating your Flex streaming TV Box, the most common solution is to restart it by reconnecting your USB-C power cord and HDMI cable to both the Flex streaming TV Box and TV.
If your iPad isn't running iOS 9, you need to add -webkit-flex: 0 0 155px;
to #topleft, -webkit-flex: 0 0 40%;
to #topmid, and -webkit-flex: 1;
to #topright.
Making an assumption based on your inclusion of display: -webkit-flex;
So, your new CSS might look like:
* { margin: 0; padding: 0; }
#header { height: 60px; display: -webkit-flex; display: flex; }
#topleft { -webkit-flex: 0 0 155px; flex: 0 0 155px; height: 100%; background-color: green; }
#topmid { -webkit-flex: 0 0 40%; flex: 0 0 40%; height: 100%; background-color: blue; }
#topright { -webkit-flex: 1; flex: 1; background-color: yellow; }
Also, Chrome on iPad is still using the Safari engine... it's just a webview, so we don't get all the up to date Chrome goodness we get on android devices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With