curved edges and accentuate the chosen one

I've been working on an angularJS application that includes a webpage with multiple tabs created using angularJS. Check out this example of the working tabs: http://plnkr.co/edit/jHsdUtw6IttYQ24A7SG1?p=preview

My goal is to display all the tabs with rounded corners and highlight the selected tab, similar to the image below. I've attempted to achieve this using CSS but haven't been successful. Any suggestions would be appreciated.

Here's the code snippet:

<html>   
   <head>
        <script data-require="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a6c7c8c1d3cac7d488ccd5e69788978893">[email protected]</a>" data-semver="1.1.5" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.js"></script>
        <script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.5.0.js"></script>
        <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
        <style>
            .nav-tabs>.active>a, .nav-tabs>.active>a:hover, .nav-tabs>.active>a:focus {
                background-color: pink;
            }
            .pageSecTitle,.sel td:nth-child(2) {
                border: 0;
            }
            td select {
                vertical-align: top;
            }

       </style>
        <script>
            //controller for tabs
            var app = angular.module('plunker', ['ui.bootstrap']);
            app.controller("TabsParentController", function ($scope) {
                var setAllInactive = function() {
                    angular.forEach($scope.workspaces, function(workspace) {
                        workspace.active = false;
                    });
                };
                $scope.workspaces =
                        [
                            { id: 1, name: "Tab1", active:true},
                            { id: 2, name: "Tab2", active:false},
                            { id: 3, name: "Tab3", active:false}
                        ];
                $scope.addWorkspace = function () {
                    setAllInactive();
                };
            });
            app.controller ("TabsChildController", function($scope, $log){
            });
         </script>
    </head>
    <body>
    <br><br>
    <div ng-controller="TabsParentController">
        <tabset>
            <tab ng-repeat="workspace in workspaces"
                 heading="{{workspace.name}}"
                 active=workspace.active>
                <div ng-controller="TabsChildController">
                    --some dynamic content here--
                </div>
             </tab>
        </tabset>
    </div>
    </body>
    </html>

Answer №1

Consider incorporating the following CSS rule into your existing stylesheet:

.nav-tabs>li>a, .nav-tabs>li>a:hover, .nav-tabs>li>a:focus {
    border: 1px solid red;
}

This will apply a red border to all tabs that are not currently active. To add a border to the active tab, simply modify your existing CSS rule that sets the background color to pink.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilizing Grunt to streamline a personalized project

I have set up Grunt as my "JS Task Runner". Node.js is installed in the directory "C:/Program Files". NPM has been installed in C:/users/Peterson/appdata/roaming/npm. Inside the npm folder, I have Grunt, Bower, and Grunt-cli. I am working on a pro ...

What is the best way to update the root page title when loading ajax content?

Help needed with AJAX script to load content from external page I am using the following AJAX script to retrieve content from a specific div on an external page and display it in a corresponding div on my main page. $(function() { var newHash ...

Displaying iFrame Border in React Native WebView

When attempting to dynamically add YouTube videos to my React Native app, I decided to utilize a combination of WebView and iFrame due to the incompatibility of the current react-native-youtube component with RN 16+. Although this solution works, the ifram ...

Possible rewrite: "Unable to use jQuery to add elements to data fetched through AJAX requests."

I am looking to add a button to copy code inside every div that has a class starting with language. The code is functioning properly, however, after attempting to retrieve data from the database using Ajax, the button no longer appears in the div as it did ...

Organizing a NodeJS module - properties and functions

I've been struggling to structure my NodeJS application with modules, and after hours of searching, I haven't found a definitive answer. Let's say I want to create a "user" module for creating new users in my code: var newUser = new User(); ...

Error encountered in Chrome while trying to fetch Next.js PWA with the use of next-pwa: Unhandled TypeError

Hello, I was recently working on a Next.js project and attempted to convert it into a PWA using next-pwa. To start off, I created the next.config.js file. const withPWA = require('next- pwa'); module.exports = withPWA({ pwa: { dest: ...

software tool for managing state transitions

Can anyone recommend a superior javascript library for workflows? Right now, I'm utilizing Joint JS, but I require something with a more visually appealing interface (users tend to prefer that). ...

To ensure proper display, the canvas should be set to display block when its width is 100vw and height is 100vh

Can anyone explain why I need to include display: block when my canvas is full page? Without it, the canvas size appears larger even though the width and height values are the same. Appreciate any insights. Thanks! ...

Styling for Print Media: Adjusting the horizontal spacing between inline elements

I have been developing a custom AngularJS point-of-sale (POS) system that requires printing receipts upon completing a sale. To achieve this, I am using ng-print to print out a sales summary displayed within a specific div element after hiding all other un ...

Steps for designing a stationary footer in HTML and CSS

I have implemented a static footer on my website: HTML <div class="card fixedFooter"> <div class="card-body space-around"> <button type="button" class="buttonFooter" routerLink="/myRouter" > <i class ...

The three.js plugin is not loading in tern.js

Issue I am currently in the process of developing a 3D web application using three.js. For my development environment, I have opted to use neovim and YouCompleteMe for code completion. To enable JavaScript completion, I have installed tern and created a ...

Is it necessary to include async/await in a method if there is already an await keyword where it is invoked?

Here are the two methods I have written in Typescript: async getCertURL(pol: string): Promise<string> { return await Api.getData(this.apiUrl + pol + this.certEndpoint, {timeout: 60000}).then( (response) => { return response.data.certUR ...

The jQuery remove function will only take effect on the second click following an AJAX request

I'm facing an issue with my jQuery code where two divs contain lists of links, triggering AJAX calls to append JSON data to a separate div. Upon clicking a link, the corresponding link div should hide. There's also a third div with the class "pan ...

Can you explain the purpose of prevState within the setState method of a functional component?

When returning the updated previous state within a setState method retrieved from the useState hook, it appears that the state remains unchanged. To demonstrate this behavior, consider running the following code snippet: function App(){ const [state, ...

There is no response from Ajax

I am facing an issue with my AJAX call in communication with my Rails controller. Even though the AJAX call itself seems fine, the callback function does not contain any data. Here is the AJAX request I'm making: $.ajax({ url: '/get_progres ...

Issue with using async await in map function: async function may not complete before moving on to the next item in the

Currently, I have an array that needs to be mapped. Inside the mapping function, there is an asynchronous function being called, which conducts an asynchronous request and returns a promise using request-promise. My intention was for the first item in the ...

Troubleshooting issues with the 'date' input type feature on mobile devices

When I use the following code: <input type='month' ng-readonly='vm.isReadonly' required min="{{vm.threeMonthsAgo}}" max='{{vm.oneMonthAhead}}'/> I am experiencing some difficulties on mobile devices that do not occur o ...

Struggling to align elements in a navbar using HTML and CSS?

Currently, I'm in the process of building a simple website and focusing on customizing the navbar. The logo within the navbar is created using font awesome and text, with a larger font size compared to other elements in the navbar. However, I am facin ...

`A dynamically captivating banner featuring animated visuals created with JQuery`

I am currently in the process of designing a banner for the top of my webpage, but I have yet to come across any code that meets all my requirements. To provide clarification, I have attached an illustration showcasing what I am aiming to achieve. 1) The ...

How to send emails with attachments using WordPress?

Looking for assistance in sending emails with attachments using Wordpress. I am struggling and believe there might be something missing in my code. Any help would be greatly appreciated! :) Below is the code spread across two files: Name (required)<b ...