Guide to modifying the attributes exclusively of the external borders in Bootstrap tables

Is there a way to customize only the outer border of a bootstrap 4 table by changing properties such as border-color, border-style, and border-radius? I attempted to do so, but it seems that the properties are being overridden. Here is my code:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">            
  <table class="table table-bordered">
    <thead>
      <tr>
        <th>Firstname</th>
        <th>Lastname</th>
        <th>Email</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>John</td>
        <td>Doe</td>
        <td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="107a7f787e507568717d607c753e737f7d">[email protected]</a></td>
      </tr>
      <tr>
        <td>Mary</td>
        <td>Moe</td>
        <td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="345955464d74514c55594458511a575b59">[email protected]</a></td>
      </tr>
      <tr>
        <td>July</td>
        <td>Dooley</td>
        <td><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="177d627b6e57726f767a677b723974787a">[email protected]</a></td>
      </tr>
    </tbody>
  </table>
</div>

</body>
</html>

Answer №1

Customize the default appearance by modifying the bootstrap CSS file or adding <style> within the <head> section of your HTML document.

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

Is it possible to use AngularDart's ng-repeat directive in HTML tables

I've been struggling to iterate over lists with sublists and display them as <tr> elements without much luck. The following code represents what I'm trying to achieve: <table> <tr> <th>1</th> <th>2& ...

JavaScript's jQuery selector retrieves a child element from one location and adds it to a different

Why does the Jquery children selector select the img element, extract it, remove it, and then append it to another div element? Shouldn't it create a copy of the element being appended? var $anchors = $("#imageGallery a"); var $overlay = $('&l ...

Tips for specifying headings for a particular div ID

I'm attempting to customize the font-family of the headings within my header section differently from the headings located elsewhere on the webpage. Unfortunately, I am encountering difficulties in ensuring that this style change only affects the spec ...

Blur effect on backdrop-filter causing shadowy inset borders (specific to Chrome and Windows)

Note: The issue mentioned below has been resolved in the latest version of Chrome (119.0.6045.200). While transitioning on backdrop-filter, I have observed a dark inset shadow that is only visible during the transition. This behavior seems to occur only ...

Unable to showcase array JSON values on HTML using ng-model

Utilizing ngTagInput for autocomplete textbox and successfully receiving suggestions. To display the values of data-ng-model (named "list") I am using: {{list}} and it is showing correctly. However, when selecting "list1", the display appears as: [{"lis ...

How can I align those 3 divs in the center of the body?

Can someone help me with centering those 3 divs in the body? I have tried creating 2 versions of the row, one with an extra outer wrap around the column and one without. Unfortunately, since this HTML was created with a page builder (WP visual composer), I ...

What is the best way to trigger a sound to play once when the document is loaded?

I was looking for an easy and straightforward method to play a sound as soon as the document is loaded. After browsing through various online resources, I couldn't find a clear explanation. Can someone please assist me on how to create this in a brow ...

The Bootstrap toast fails to appear on the screen

I am currently working on a website project using HTML with bootstrap and javascript. I have been attempting to include a toast feature by implementing the code provided on the bootstrap website: <div class="toast" role="alert" aria-live="assertive" ...

Attempting to assign a value to the Progress Circle

Can I modify the code to incorporate a hardcoded number instead of displaying "Goals completed:" and still have the progress bar reflect the percentage? I want to hide the prompt for users to input a number and handle all updates behind the scenes. Essent ...

Switching CodeIgniter's controller to the primary controller within a designated div

<li><a href="maine/home#services">SERVICES</a></li> <li><a href="maine/home#about">ABOUT</a></li> <li><a href="maine/home#contact">CONTACT</a></li> I'm currently using CodeIgnite ...

How can I make an HTML button function with a JavaScript script?

When I click a button in an HTML file, it should trigger a function in a JavaScript file to display an alert that says "hey." However, this simple task is not working for me and I am unsure why. Java Script is enabled in my browser (Google Chrome) and I am ...

Managing the height of a hero section with TailwindCSS and React.js

Embarking on my first website project using React and Tailwind has been an exciting learning experience. My vision is to showcase a Hero Section prominently at the top, with a Nav bar situated elegantly at the bottom of the screen. To bring this concept ...

What is the best way to incorporate visual indicators into specific columns containing certain keywords?

Is there a way to customize the script code responsible for displaying table data so that icons automatically appear next to specific keywords in the Gender column? For instance, can we have an icon like glyphicon glyphicon-heart-empty for Male and glyphic ...

Steps to generate a new page when submitting a form:

When a form is submitted, I am aiming to generate a fresh page each time. This new page will serve as an order status tracker that will be updated regularly. Essentially, my goal is for users to see a confirmation page for the form submission and have acce ...

Is it possible to insert Ruby variables into HAML css using interpolation?

I am in need of a sequence of classes, such as .module1, .module2, ... module(n). My goal is to specify these classes using css, ruby, and HAML: :css .mod1 { background-image: url("#{extra.image}"); } Can I use Ruby variables to streamline ...

Incorporating search suggestions into a div with vue 3 and boostrap: a step-by

I am currently experimenting with building a compact search box that offers suggestions using the vue 3 boostrap library. I am aiming to have the suggestions box float on top of the following div without pushing it down. Despite trying to manipulate the z- ...

Grid item overlay

Currently, I am facing an issue with React where I am attempting to place an overlay on top of each grid item in a grid. Despite trying multiple approaches, the overlay appears beneath each grid item instead of over it. Even setting the position: absolute ...

Attempting to position a centrally aligned div block containing images towards the left side

I'm having an issue with aligning multiple images on my webpage. I want them to be left justified when the page is resized, while still keeping the div block centered. Currently, they are all being centered: See below: Here is the HTML and CSS code ...

Using jQuery to organize divs into columns

I am working with a parent div that contains 19 child divs all with the same class, structured like this: <div id="dropdown-content1"> <div class="CatsColumn"></div> <div class="CatsColumn"></div> <div class="C ...

Flawless Carousel - Flipping the Sequence

I am currently implementing Slick Carousel on a website that I am working on. One challenge I am encountering is trying to get the "slider-nav" to move in the opposite direction than it normally does. For instance, at the moment, the order goes like this ...