Articles on Trending Technologies

Technical articles with clear explanations and examples

Style Bootstrap 4 cards with bg-dark class

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 2K+ Views

Use the bg-dark contextual class in Bootstrap 4 to add a gray background to a card −In the below code snippet, I have used the bg-dark class to style the Bootstrap card. With that, I have also the text-while class to set the text to be white −   This is it! Let us see the complete example to work with bg-dark class −Example       Bootstrap Example                             Notification            This is it!               How you doing?      

Read More

How to initialize and compare strings?

Vikyath Ram
Vikyath Ram
Updated on 11-Mar-2026 480 Views

Following example compares two strings by using str compareTo (string), str compareToIgnoreCase(String) and str compareTo(object string) of string class and returns the ascii difference of first odd characters of compared strings.Examplepublic class StringCompareEmp{    public static void main(String args[]) {       String str = "Hello World";       String anotherString = "hello world";       Object objStr = str;       System.out.println( str.compareTo(anotherString) );       System.out.println( str.compareToIgnoreCase(anotherString) );       System.out.println( str.compareTo(objStr.toString()));    } }OutputThe above code sample will produce the following result.-32 0 0String compare by equals()This method compares this ...

Read More

Create a Bootstrap 4 card header

Amit Diwan
Amit Diwan
Updated on 11-Mar-2026 781 Views

To create a card header in Bootstrap 4, use the card-header class. Set the header inside the card using the class −   Product List After adding the header, add the body of the card as shown in the following code snippet −Product List       Product One     Product Two   Let us see an example to learn how to create Bootstrap 4 card header −Example       Bootstrap Example                             Products           Product List           Product One       Product Two               This was the list of products in stock.      

Read More

hidden.bs.popover Bootstrap event

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 629 Views

The hidden.bs.popover event fires when the popover is completely hidden.Fire the popover event −$("[data-toggle='popover']").on(hidden.bs.popover', function(){   alert('The Popover is now hidden!'); });You can try to run the following code to implement the hidden.bs.popover event −Example       Bootstrap Example                             Awards           Here's the list:       List (Display)       List (Hide)             $(document).ready(function(){     $(".btn-primary").click(function(){ ...

Read More

Vertically stack tabs with Bootstrap

Smita Kapse
Smita Kapse
Updated on 11-Mar-2026 662 Views

Use the .nav-stacked class in Bootstrap to vertically stack tabs,You can try to run the following code to implement the .nav-stacked class minus;Example           Bootstrap Example                                          Database          The following are the database technologies:                       DB2             MySQL             SQL             CouchDB                    

Read More

Bootstrap 4 .border-warning class

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 309 Views

Use the border-warning class in Bootstrap to set orange border to an element.To add orange border, set the div as −   Warning (Orange border) You can try to run the following code to implement the border-warning class −Example       Bootstrap Example                             .new {       width: 200px;       height: 150px;       margin: 10px;     }       The following is a Rectangle:   Warning (Orange border)

Read More

Bootstrap alert-link class

Samual Sam
Samual Sam
Updated on 11-Mar-2026 340 Views

Use the alert-link class in Bootstrap to get the links in Bootstrap.You can try to run the following code to implement the alert-link class in BootstrapExample           Bootstrap Example                                          Error!          

Read More

Style navigation tabs inside the Bootstrap 4 card header

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 417 Views

To style navigation tab inside the card header in Bootstrap 4, use the .card-header-tabs and create navigation tabs like the below example −The following is an example to style navigation tabs inside the Bootstrap 4 card header −Example       Bootstrap Example                             IDE                                         Eclipse IDE                                 NetBeans IDE                                       Eclipse IDE Introduction         Eclipse is a widely used Java IDE.            

Read More

Open Bootstrap Modal

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 489 Views

The modal(“show”) method opens a Bootstrap modal as shown below −$("#newModal").modal("show");When the following button is clicked, the modal is displayed −   Click to hide Let us see an example of modal(“show”) method to open a Bootstrap Modal −Example       Bootstrap Example                             #button1 {      width: 140px;      padding: 20px;      bottom: 150px;      z-index: 9999;      font-size: 15px;      position: absolute;      margin: 0 auto;    }   ...

Read More

Bootstrap 4 .card-header-pills class

Alex Onsman
Alex Onsman
Updated on 11-Mar-2026 689 Views

Use the card-header-pills class in Bootstrap 4 to style navigation pills in card header.Set the navigation using the card-header-pills −The following is the code snippet to use the car-header-pills class with the na-pills class −                     Java                     C             The following is an example to implement the card-header-pills Bootstrap 4 class −Example       Bootstrap Example                             Programming                                         Java                                 C                                 C++                                       Java Installation         Download JAVA JDK from Oracle Java website and...              

Read More
Showing 30001–30010 of 61,299 articles
Advertisements