Set a dark border to an element in Bootstrap

If you want to set a dark border to an element, use the border-dark class.

Spot the difference between a normal border and dark border ?

To add a dark border, you need to simply add it like any other class in div as shown below ?

  Dark Border

Above, the test is the CSS style, I have used to style my rectangle (div) ?

.myclass {
  width: 150px;
  height: 150px;
  margin: 35px;
}

Let us see how to work with the border-dark class in Bootstrap 4 ?

Example


  
    Bootstrap Example
    
    
    
    
    
    



 

Rectangles with normal and dark border:

 
Normal Border
 
Dark Border
Updated on: 2026-03-11T22:50:42+05:30

186 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements