How to style md-tab?
See original GitHub issueHow do I style the md-tab?
I’ve created a few test tabs using the documentation. But I can’t figure out how to make the tab’s width to be smaller. The default width is too large for mobile screens.
<md-tab-group selectedIndex=0>
<md-tab style="width:50px">
<template md-tab-label>Tab1</template>
<h1>Some more tab content</h1>
<p>...</p>
<template md-tab-content>
</template>
</md-tab>
<md-tab>
<template md-tab-label>Tab2</template>
<template md-tab-content>
<h1>Some more tab content</h1>
<p>...</p>
</template>
</md-tab>
</md-tab-group>
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
W3.CSS Tabs - W3Schools
Tabbed navigation is a way to navigate around a website. Normally, tabbed navigation uses navigation buttons (tabs) arranged together with the selected tab...
Read more >Styles Tab - Skillsoft Product Documentation
The Styles tab displays the styles for the selected block or page. Styles are based on cascading style sheets (CSS). ... Clicking the...
Read more >15 CSS Tabs - Free Frontend
Collection of free HTML and pure CSS tabs. ... selector combined with a lot of + 's to style different pages of an...
Read more >Tab Styles Inspiration - Codrops
Tab Styles Inspiration: A small collection of styles for tabs. ... Technique from Slanted tabs with CSS 3D transforms by Lea Verou.
Read more >Using the Styles Tab - PTC Support
On the Styles tab, you can modify two types of style theme settings: Global and Elements. By default, style settings cascade from Global...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hstevensagain thx! the css code you gave worked!
@jelbourn, @RedFour seems to specifically be talking about this, which doesn’t look slated for theming at the moment. Dynamic changes to the width of the tabs probably aren’t in the scope of app wide theming either.
Imo md-tab-labels shouldn’t have a min-width. They should expand and contract to the width of the md-tab-group, keeping the tabs responsive after that is the developer’s job.
I get that there is a lot more work to be done on md-tabs, for the mean time changing the
min-width: 160px;
towidth: 100%;
would make md-tabs a lot more usable and responsive.