Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angularjs UI Bootstrap: How to modify uib-tab CSS

I am using the UI Bootstrap tabs, and I want to change the CSS for some of the components, but am not sure of how exactly to access the different elements.

The elements I would like to change are the text for the active tab, the text for the unactive tab, and the borders for both.

What is the correct syntax need to access these tabs in CSS?

Here is the uib-tab HTML I am using:

<uib-tabset>

    <uib-tab heading="Episodes"></uib-tab>

  <uib-tab heading="Categories"></uib-tab>

</uib-tabset>

I'm pretty new to CSS - apologies in advance...

like image 693
Tom O'Brien Avatar asked Jan 24 '16 15:01

Tom O'Brien


Video Answer


1 Answers

You can simply edit bootstrap's css for .nav-tabs

.nav-tabs > li > a {
    border: 1px solid #000;
}

For active tab

.nav-tabs > li.active > a {
    /*CSS HERE*/
}

Optionally you can style the uib-tab class added by Angular:

.uib-tab a {
    border: 1px solid #000;
  }

For active uib-tab

.uib-tab.active a {
    /*CSS HERE*/
}
like image 161
Yug Kapoor Avatar answered Oct 15 '22 06:10

Yug Kapoor