Alignment issue with column headers in Bootstrap Table

https://i.sstatic.net/nKtgx.png

                    <table class="table">
                    <thead>
                        <tr class="d-flex">
                            <th class="col-0">JOB ID</th>
                            <th class="col-0">JOB STATUS</th>
                            <th class="col-0">USER</th>
                            
                            <th class="col-0">BG TASK STATUS</th>
                            <th class="col-2">BG TASK RESULT</th>
                            <th class="col-0">BG TASK CREATED TIME</th>
                            <th class="col-0">BG TASK COMPLETED TIME</th>
                            
                            <th class="col-0">DETAIL LOG LINK</th>    
                        </tr>
                    </thead>
                    <tbody>
                        
                        
                        <tr class="d-flex">
                            <td class="col-0">15</td>
                            <td class="col-0">success</td>
                            <td class="col-0">None</td>
                           
                           
                            <td class="col-0"></td>
                            <td class="col-2"></td>
                            <td class="col-0"></td>
                            <td class="col-0"></td>
                            
                            
                           <td class="col-0"><a href="/logs?job_id=15">Job Details</a></td>
                            
                        </tr>
                        
                    </tbody>
                </table>
                    

Answer №2

To center-align the text within a table, simply include the text-center class in your code

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

Positioning a div inside another div using CSS

I'm having issues with a nested div causing trouble for me. <div style="border:solid 20px #ccff33;border-radius:10px;height:300px;width:300px;margin:20px;display: inline-block"> <img src="images/f35.jpg" style="margin-right:10px" /> ...

Grid system that adapts without distortion

My goal is to create a grid that maximizes the number of elements in its width without stretching them to fit the entire window. That's why I'm utilizing CSS grid with the auto-fill property, which is almost achieving the desired outcome. I want ...

Percentage outlined

Is there a way to create a .testing element with a width of 100% (150px)? <div class='debug'> <div class='debug'> <div class='testing'>Hello world!</div> </div> </div> *, * ...

The second pop-up modal fails to appear

I have successfully implemented 2 modal windows with the help of bootstrap. The first modal is used for adding a user to the database, and the second one is meant for editing an existing user. While the first modal works perfectly fine, the editing modal d ...

Sometimes, in extremely rare instances, external stylesheets may fail to download or be properly applied

There have been very rare occurrences where major websites like Amazon and Facebook do not load a CSS file or apply the rules correctly, resulting in pages looking incomplete: I was recently asked to provide an internal explanation after receiving a compl ...

Is there a dynamic element that cannot be accessed in the rest of the DOM?

Currently, I am facing an issue with a dynamically generated button using jQuery. This button is present on every row of my table, and I am looking to implement some functionality to it. However, my biggest challenge is selecting the parent elements of thi ...

What is preventing me from adjusting the height of this DIV element?

I'm completely stumped by what's happening here. I've been trying to increase the height of a DIV element with an id of #titleStrip, but it just won't budge. It's beyond frustrating. I thought I knew my way around this kind of thin ...

Ensure every individual input field in a Bootstrap form is validated using JavaScript before submitting the form

As a newcomer to Javascript, I am seeking assistance with validating each field in the form below without having to click on the submit button. Your help is greatly appreciated! <form action="" id = "form1" class = "form-group row"> & ...

Adjust the divs right element by adding or removing 1 pixel for every size change in the browser

I have been exploring different approaches to achieve this task and it seems like using javascript might be the most effective way. I am currently dealing with a stubborn social icon container placement issue. More details on my previous question can be fo ...

What is the reason behind the continual change in the background image on this website?

Can you explain the functionality of this background image? You can find the website here: ...

Using the -webkit-box-reflect property along with the CSS position:absolute styling

Running on the Chrome Canary build, I have come across this HTML code snippet: <div id="debug" class="debug" >TEST</div> Additionally, here is the CSS code snippet: -webkit-box-reflect: below 0px -webkit-gradient(linear, ...

Using JavaScript to trigger an open dropdown menu in Bootstrap 4

I have a dropdown menu that is designed like this: <div id="actions" class="dropdown btn-group btn btn-outline-secondary" role="group"> <div id="actionToggle" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="fa ...

Attempting to modify the background color of an iFrame in Internet Explorer

I am experiencing an issue with my webpage where the iFrame is displaying with a white background in IE, while it shows up with a blue background in Firefox and Chrome. I have attempted various solutions to make the background of the iframe blue or transpa ...

Pattern to locate a CSS class identifier

I've been working on creating a regex to match valid CSS class name structures. Currently, my progress looks like this: $pattern = "([A-Za-z]*\.[A-Za-z]+\s*{)"; $regex = preg_match_all($pattern, $html, $matches); However, there are certai ...

Encountering a 'popper.js is missing' error in Laravel while interacting with a Bootstrap 4 div that has the class 'input-group-prepend' on click

Upon clicking on an element enclosed by a div with the class input-group-prepend, I encountered the following error in the console: TypeError: popper is null app.js:50778:3 The click function works when I remove the surrounding div, but it's neces ...

Perform a jQuery computation using a CSS style

Having trouble with a calculation using a CSS property that is not returning any value. Seems like the issue might be due to the CSS property returning '200px' instead of just '200'. Any suggestions for a workaround? Thanks in advance. ...

Dynamic CSS manipulation with jQuery: Generate and access styles on the fly

I am working on an application where I am utilizing jQuery along with maphilight for highlighting image map segments. In addition to this functionality, I want to dynamically highlight specific HTML elements based on mouseover/mouseout events for the image ...

What is the process for designing a menu with animated scaling effects?

I have a design file in PSD format that looks like this. https://i.sstatic.net/R46Ko.jpg My goal is to create a website similar to , where when a user hovers over a link, a circle will appear around it. I am using Bootstrap 4.5 for this project. Here is ...

Transforming CSV CSS values with jQuery's CSS method: Step-by-step guide

My goal is to stack multiple background images within a single div container while ensuring their position is relative to the screen height. The problem I'm encountering is my inability to modify CSS values separated by commas. Here is my logical appr ...

Enhancing jQuery Mobile listview with voting buttons on each item row

I am looking to incorporate 2 vote buttons within a jQuery mobile listview, positioned on the left-hand side and centered within each list item. While I have managed to achieve this using javascript, my goal is to accomplish it without any additional scrip ...