material icon indicating copy to clipboard operation
material copied to clipboard

md-tabs gets hidden in IE when used with md-center-tabs

Open PrashantAshok opened this issue 11 years ago • 7 comments

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.

PrashantAshok avatar Apr 17 '15 17:04 PrashantAshok

+1

r0b- avatar Jun 21 '15 17:06 r0b-

+1

GautierT avatar Jul 07 '15 11:07 GautierT

+1

Red-Rover avatar Jul 28 '15 15:07 Red-Rover

+1. set md-center-tabs = "false" for now.

deckikwok avatar Jul 31 '15 03:07 deckikwok

+1

RichOren avatar Sep 25 '15 21:09 RichOren

+1

I've tested that this happens with angular-material 0.10.1 and 0.11.2

epelc avatar Oct 08 '15 14:10 epelc

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.

epelc avatar Oct 11 '15 23:10 epelc