I used flexbox to spread the list items in the footer navigation across the width of footer.
It is being displayed correctly in my browser and also in Chrome's mobile emulation. However it is ignored on any mobile device I've tested with (iPhone, iPad, Samsung tablet).
Does anyone see anything obvious wrong with the code I'm not aware of? Below is the CSS/LESS snippet I'm using.
ul {
display: flex;
justify-content: space-between;
width: 100%;
padding: 0;
li {
padding: 0;
}
}
This is happening as display:flex
& justify-content: space-between
are not compatible in all type of browsers.So we should have a cross-browser compatible CSS like this:
ul {
-ms-box-orient: horizontal;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -moz-flex;
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
width: 100%;
padding: 0;
li {
padding: 0;
}
}
Browser Support for display:flex
Browser Support for justify-content: space-between
Useful Links:
https://caniuse.com/#feat=flexbox
https://caniuse.com/#feat=mdn-css_properties_justify-content_flex_context
https://css-tricks.com/using-flexbox/
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