md-tabs gets hidden in IE when used with md-center-tabs
Hi,
i created a plnkr. The tabs does not show up in IE 11 with the md-center-tabs, but works fine in Chrome/Firefox. Removing md-center-tabs attr shows up the tab.
Had a quick look, this could be due to transform being applied to
md-pagination-wrapper.md-center-tabs. Removing transform at least shows the tab in IE.
Thanks.
+1
+1
+1
+1. set md-center-tabs = "false" for now.
+1
+1
I've tested that this happens with angular-material 0.10.1 and 0.11.2
Looks like this is caused by the following css
md-tabs-canvas.md-center-tabs { text-align: center; }
I've found that moving the text align to the inner pagination element and adding width: 100%; fixes this issue. I haven't tested this in other browsers so I added a css media query hack to only apply the fix to ie11.
// Only apply this fix to ie11 using the media query css hack.
@media all and (-ms-high-contrast: none) {
md-tabs-canvas.md-center-tabs {
// This is normally 'center' but we need to turn it off so the tabs aren't invisible.
text-align: left;
}
// The following correctly aligns the tabs to the center.
md-pagination-wrapper.md-center-tabs {
width: 100%;
text-align: center;
}
}
This seems to work without any bugs, and also works when you have a small screen and the arrows are showing.
I also just noticed that the tabs aren't invisible when the arrows are showing without the above fix. Perhaps there's a better way to fix it since it works when the arrows are showing.