Customize the appearance of the active head panel in the Bootstrap Accordion

How can I style the active position of the 'panel heading' like this: https://i.sstatic.net/75s2A.jpg

I am looking to include a background color and font-weight for the active panel, as well as have the icon positioned downwards... Here is my current code:

http://www.bootply.com/wZrFTAIRfe

P.S. Please excuse any errors in my English.

Answer №1

Give this a shot:

.panel-default>.panel-heading[aria-expanded="true"] {
    font-weight: bold;
    background-color: #99ccff;
    background-image: url(http://storage4.static.itmages.ru/i/16/0724/h_1469363621_2952426_312a0c7b35.png);
}

Answer №2

insert this into your css file

[aria-expanded="true"] .panel-title
{
background-color: blue;
font-weight: 600;
}

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

Instructions on how to dynamically update a form field based on the input in another field using conditional statements

I'm seeking advice on how to automatically update a field based on user input without the need for manual saving. For example, if the user types '95' in the input field, the equivalent value displayed should be '1.0' in real-time. ...

What causes Chrome Extension Images to appear broken when they are inserted into the DOM?

Currently working on a Chrome extension, I am attempting to insert a div with a background image into the DOM using a content script. The CSS is loading correctly, and upon inspecting the Developer Tools, the image URL appears to be correct. $('.clos ...

Internet Explorer 7 is failing to enlarge a div in order to accommodate the content loaded

When loading content into divs using $.load(), it works smoothly in Firefox and Chrome, but I'm facing issues with IE7. The page isn't getting redrawn after the content is loaded, resulting in most of the content being cropped. Despite reading va ...

Clicking on a series in HighCharts will dynamically add a div element

When working with high charts, I encountered an issue where I wanted to create a popup when clicking on each bar using the jQuery balloon popup plugin. Below is the code snippet: plotOptions: { series: { slicedOffset: 0, ...

Different Ways to Continuously Move an Object with jQuery

Is it possible to use jQuery to move the title of an HTML page horizontally indefinitely until the browser is closed? How can I achieve this functionality? Thank you for your assistance. ...

Choosing an option in react-select causes the page to unexpectedly shift

Encountering a problem with a mobile modal developed using react-select. The selectors are within a div with fixed height and overflow-y: scroll. Upon selecting an option for the 'Choose observer' select, the entire modal briefly jumps down in th ...

Utilize duplicate named CSS grid rows as a reference

Summary; This method currently works, but it requires adding multiple nth-child selectors for each new person and their answer. I am seeking a solution that can dynamically handle any number of rows using an even and odd selector to simplify the process. ...

Issue with ng-bind not functioning correctly within a custom directive on a label

A custom directive was implemented to incorporate a hint-icon with a description for labels. Here is the code snippet for the directive: propertyWindowModule.directive('hintIcon', { restrict: 'A', controller: HintI ...

Is there a way to utilize JavaScript and AJAX to save a WordPress cookie and log in a user, all without the need for any plugins?

My goal is to log in to WordPress using only ajax requests. Here's the code I have so far: var username = data.username; var password = data.password; var wp_login_url = "http://local_Ip/api/user/generate_auth_cookie/?username=" +username + "&pas ...

Tips for verifying if an ASP.Net File Upload Control contains a file using JQuery

Currently, I'm working on a custom validator where I need to validate if a file has been uploaded using the asp.net File Upload Control. Here's what I have so far: function validate(sender, args) { if ($('#<%= hdnID.ClientID%>&ap ...

Tips for updating a plugin from phonegap 2.5 to the most recent version 3.1, and the steps to follow when including a new plugin in phonegap

$('#sendSms').click(function(e){ alert("Sending SMS in progress");//After this alert, I encountered continuous errors and couldn't determine the root cause var smsInboxPlugin = cordova.require('cordova/plugin/smsinboxplugin'); ...

Using the HTML video tag to apply different background colors based on the individual machines being

My web application includes a video that is set to play against the same background color as the webpage. However, I am experiencing an issue where the video background appears differently on various machines using the same browser. What I would like to ac ...

Tips for Deleting the Background of a Jquery Mobile Dialog

I am having an issue where the dialog only takes up 10% of the page and I would like to make the background transparent so that the previous page remains visible. Here is the javascript code that calls the dialog: $.mobile.changePage('#popdiv', ...

Styling with CSS: The Art of Showcasing Initials or Images of Individuals

By following this elegant HTML and CSS example, I am able to showcase my initials over my photo. While this is wonderful, I would like the initials to be displayed only if the image does not exist; if the image is present, the person's initials shoul ...

Placing options and a clickable element within a collapsible navigation bar

Within my angular project, there are 4 input fields where users need to enter information, along with a button labeled Set All which will populate them. https://i.sstatic.net/1GGh1.png I am wondering how I can organize these input fields and the button i ...

Bootstrap table exceeds the boundaries of the smartphone screen

I'm currently working on my first laravel project with bootstrap (https://getbootstrap.com/) and I've encountered an issue related to mobile device responsiveness. The problem arises when using a basic table in bootstrap4 (the absence of the res ...

extracting an attribute from a class's search functionality

Let's consider the following HTML structure: <div id="container"> <div> <div class="main" data-id="thisID"> </div> </div> </div> If I want to retrieve the value inside the data-id attribute ...

Discover the key steps to extracting codes within a string in React or Javascript

I am currently developing an application that could potentially receive a string from the backend server. The string might look something like this: If you were to fold a piece of paper in half 50 times, its width would be three-quarters of the distance fr ...

javascript containing the response message

I've created an Ajax function that retrieves a script from the server containing RSS feed information. I'm currently placing this response within a div using: $("#divId").html(responsetext); My goal is to execute the script included in the resp ...

automatically created button, form control named 'answer' that is not valid

Struggling with a challenge in attaching an event to a dynamically generated button. Despite conducting some research, most of the solutions suggest that this issue is typically related to a form control. However, in my scenario, the error "invalid form co ...