For loop for nav-tabs - html

I have 2 objects in corporate_goal and I am trying to execute blocks with this objects in for loop like:
{% load static %}
{% for goal in corporate_goal %}
{% block content %}
<!-- Corporate goal section-->
<div class="row">
<div class="section-title">
Corporate Goal: {{goal.corp_goal_title}}
</div>
<div style="margin-inline-start:auto">
{{todo}}0 % of total score TODO
</div>
</div>
<div class="row">
<p>HR Rating</p>
<p>&nbsp</p>
{% if goal.corp_factor_rate %}
<p style="color:mediumspringgreen">rated</p>
{% else %}
<p style="color:indianred">unrated</p>
{% endif %}
<p>&nbsp</p>
</div>
<!-- Tabs for details-->
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#det1{{goal.corp_goal_title}}">Goal Details</a></li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#det2{{goal.corp_goal_title}}">Other Details</a></li>
</ul>
<!-- Tabs content for details-->
<div class="tab-content" >
<!--First tab-->
<div id="det1{{goal.corp_goal_title}}" class="tab-pane fade show active">
<div class="row">
<!--Column 1-->
<div class="col">
<table class="table-bordless" style="margin-top:20px;">
<tbody>
<tr>
<th>Start Date</th>
<td width="50"></td>
<td>{{goal.start_date}}</td>
</tr>
<tr>
<th>Weight</th>
<td width="20"></td>
<td>{{goal.corp_factor_weight}} %</td>
</tr>
</tbody>
</table>
</div>
<!--Column 2-->
<div class="col">
<table class="table-bordless" style="margin-top:20px;">
<tbody>
<tr>
<th>Due Date</th>
<td width="50"></td>
<td>{{goal.end_date}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!--Second tab-->
<div id="det2{{goal.corp_goal_title}}" class="tab-pane fade" style="margin-top:20px;">
<p>Factor for Goal Achievement:</p>
<table class="table">
<tbody>
<tr>
<th>Factor</th>
<td>0</td>
<th>Description</th>
<td>{{goal.corp_factor_0}}</td>
</tr>
<tr>
<th>Factor</th>
<td>1</td>
<th>Description</th>
<td>{{goal.corp_factor_1}}</td>
</tr>
<tr>
<th>Factor</th>
<td>2</td>
<th>Description</th>
<td>{{goal.corp_factor_2}}</td>
</tr>
<tr>
<th>Factor</th>
<td>3</td>
<th>Description</th>
<td>{{goal.corp_factor_3}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<br />
<br />
<br />
{% endblock %}
{% endfor %}
In blocks I have nav-tabs, but it works only for first object in the loop. Why? Do you have some idea?
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css">

Related

Edit Cart on Html template

on the cart page, Quantity, delete button, update cart, Subtotal, Shipping, Total, is not working at all, how i can make them work? This is all i have for cart page:
Also here is the link where you can see it http://194.110.247.137/cart.html.
Thank you!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Responsive Bootstrap4 Shop Template, Created by Imran Hossain from https://imransdesign.com/">
<!-- title -->
<title>Cart</title>
<!-- favicon -->
<link rel="shortcut icon" type="image/png" href="assets/img/favicon.png">
<!-- google font -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Poppins:400,700&display=swap" rel="stylesheet">
<!-- fontawesome -->
<link rel="stylesheet" href="assets/css/all.min.css">
<!-- bootstrap -->
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<!-- owl carousel -->
<link rel="stylesheet" href="assets/css/owl.carousel.css">
<!-- magnific popup -->
<link rel="stylesheet" href="assets/css/magnific-popup.css">
<!-- animate css -->
<link rel="stylesheet" href="assets/css/animate.css">
<!-- mean menu css -->
<link rel="stylesheet" href="assets/css/meanmenu.min.css">
<!-- main style -->
<link rel="stylesheet" href="assets/css/main.css">
<!-- responsive -->
<link rel="stylesheet" href="assets/css/responsive.css">
</head>
<body>
<!--PreLoader-->
<div class="loader">
<div class="loader-inner">
<div class="circle"></div>
</div>
</div>
<!--PreLoader Ends-->
<!-- header -->
<div class="top-header-area" id="sticker">
<div class="container">
<div class="row">
<div class="col-lg-12 col-sm-12 text-center">
<div class="main-menu-wrap">
<!-- logo -->
<div class="site-logo">
<a href="index.html">
<img src="assets/img/logo.png" alt="">
</a>
</div>
<!-- logo -->
<!-- menu start -->
<nav class="main-menu">
<ul>
<li class="current-list-item">Home
<ul class="sub-menu">
<li>Static Home</li>
<li>Slider Home</li>
</ul>
</li>
<li>About</li>
<li>Pages
<ul class="sub-menu">
<li>404 page</li>
<li>About</li>
<li>Cart</li>
<li>Check Out</li>
<li>Contact</li>
<li>News</li>
<li>Shop</li>
</ul>
</li>
<li>News
<ul class="sub-menu">
<li>News</li>
<li>Single News</li>
</ul>
</li>
<li>Contact</li>
<li>Shop
<ul class="sub-menu">
<li>Shop</li>
<li>Check Out</li>
<li>Single Product</li>
<li>Cart</li>
</ul>
</li>
<li>
<div class="header-icons">
<a class="shopping-cart" href="cart.html"><i class="fas fa-shopping-cart"></i></a>
<a class="mobile-hide search-bar-icon" href="#"><i class="fas fa-search"></i></a>
</div>
</li>
</ul>
</nav>
<a class="mobile-show search-bar-icon" href="#"><i class="fas fa-search"></i></a>
<div class="mobile-menu"></div>
<!-- menu end -->
</div>
</div>
</div>
</div>
</div>
<!-- end header -->
<!-- search area -->
<div class="search-area">
<div class="container">
<div class="row">
<div class="col-lg-12">
<span class="close-btn"><i class="fas fa-window-close"></i></span>
<div class="search-bar">
<div class="search-bar-tablecell">
<h3>Search For:</h3>
<input type="text" placeholder="Keywords">
<button type="submit">Search <i class="fas fa-search"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end search arewa -->
<!-- breadcrumb-section -->
<div class="breadcrumb-section breadcrumb-bg">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 text-center">
<div class="breadcrumb-text">
<p>Fresh and Organic</p>
<h1>Cart</h1>
</div>
</div>
</div>
</div>
</div>
<!-- end breadcrumb section -->
<!-- cart -->
<div class="cart-section mt-150 mb-150">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-12">
<div class="cart-table-wrap">
<table class="cart-table">
<thead class="cart-table-head">
<tr class="table-head-row">
<th class="product-remove"></th>
<th class="product-image">Product Image</th>
<th class="product-name">Name</th>
<th class="product-price">Price</th>
<th class="product-quantity">Quantity</th>
<th class="product-total">Total</th>
</tr>
</thead>
<tbody>
<tr class="table-body-row">
<td class="product-remove"><i class="far fa-window-close"></i></td>
<td class="product-image"><img src="assets/img/products/product-img-1.jpg" alt=""></td>
<td class="product-name">Strawberry</td>
<td class="product-price">$85</td>
<td class="product-quantity"><input type="number" placeholder="0"></td>
<td class="product-total">1</td>
</tr>
<tr class="table-body-row">
<td class="product-remove"><i class="far fa-window-close"></i></td>
<td class="product-image"><img src="assets/img/products/product-img-2.jpg" alt=""></td>
<td class="product-name">Berry</td>
<td class="product-price">$70</td>
<td class="product-quantity"><input type="number" placeholder="0"></td>
<td class="product-total">1</td>
</tr>
<tr class="table-body-row">
<td class="product-remove"><i class="far fa-window-close"></i></td>
<td class="product-image"><img src="assets/img/products/product-img-3.jpg" alt=""></td>
<td class="product-name">Lemon</td>
<td class="product-price">$35</td>
<td class="product-quantity"><input type="number" placeholder="0"></td>
<td class="product-total">1</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-lg-4">
<div class="total-section">
<table class="total-table">
<thead class="total-table-head">
<tr class="table-total-row">
<th>Total</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr class="total-data">
<td><strong>Subtotal: </strong></td>
<td>$500</td>
</tr>
<tr class="total-data">
<td><strong>Shipping: </strong></td>
<td>$45</td>
</tr>
<tr class="total-data">
<td><strong>Total: </strong></td>
<td>$545</td>
</tr>
</tbody>
</table>
<div class="cart-buttons">
Update Cart
Check Out
</div>
</div>
<div class="coupon-section">
<h3>Apply Coupon</h3>
<div class="coupon-form-wrap">
<form action="index.html">
<p><input type="text" placeholder="Coupon"></p>
<p><input type="submit" value="Apply"></p>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end cart -->
<!-- logo carousel -->
<div class="logo-carousel-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="logo-carousel-inner">
<div class="single-logo-item">
<img src="assets/img/company-logos/1.png" alt="">
</div>
<div class="single-logo-item">
<img src="assets/img/company-logos/2.png" alt="">
</div>
<div class="single-logo-item">
<img src="assets/img/company-logos/3.png" alt="">
</div>
<div class="single-logo-item">
<img src="assets/img/company-logos/4.png" alt="">
</div>
<div class="single-logo-item">
<img src="assets/img/company-logos/5.png" alt="">
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end logo carousel -->
<!-- footer -->
<div class="footer-area">
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6">
<div class="footer-box about-widget">
<h2 class="widget-title">About us</h2>
<p>Ut enim ad minim veniam perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae.</p>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="footer-box get-in-touch">
<h2 class="widget-title">Get in Touch</h2>
<ul>
<li>34/8, East Hukupara, Gifirtok, Sadan.</li>
<li>support#fruitkha.com</li>
<li>+00 111 222 3333</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="footer-box pages">
<h2 class="widget-title">Pages</h2>
<ul>
<li>Home</li>
<li>About</li>
<li>Shop</li>
<li>News</li>
<li>Contact</li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-6">
<div class="footer-box subscribe">
<h2 class="widget-title">Subscribe</h2>
<p>Subscribe to our mailing list to get the latest updates.</p>
<form action="index.html">
<input type="email" placeholder="Email">
<button type="submit"><i class="fas fa-paper-plane"></i></button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- end footer -->
<!-- copyright -->
<div class="copyright">
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-12">
<p>Copyrights © 2019 - Imran Hossain, All Rights Reserved.<br>
Distributed By - Themewagon
</p>
</div>
<div class="col-lg-6 text-right col-md-12">
<div class="social-icons">
<ul>
<li><i class="fab fa-facebook-f"></i></li>
<li><i class="fab fa-twitter"></i></li>
<li><i class="fab fa-instagram"></i></li>
<li><i class="fab fa-linkedin"></i></li>
<li><i class="fab fa-dribbble"></i></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- end copyright -->
<!-- jquery -->
<script src="assets/js/jquery-1.11.3.min.js"></script>
<!-- bootstrap -->
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<!-- count down -->
<script src="assets/js/jquery.countdown.js"></script>
<!-- isotope -->
<script src="assets/js/jquery.isotope-3.0.6.min.js"></script>
<!-- waypoints -->
<script src="assets/js/waypoints.js"></script>
<!-- owl carousel -->
<script src="assets/js/owl.carousel.min.js"></script>
<!-- magnific popup -->
<script src="assets/js/jquery.magnific-popup.min.js"></script>
<!-- mean menu -->
<script src="assets/js/jquery.meanmenu.min.js"></script>
<!-- sticker js -->
<script src="assets/js/sticker.js"></script>
<!-- main js -->
<script src="assets/js/main.js"></script>
</body>
</html>
I dont know what to try because i'm not that good on editing those type of templates.
I guess the template just has some hardcoded items in html but no functionality. The cart page should have a js file that handles all those functionalities that you mentioned.

bootstrap4 row height needs to be smaller

For some reason I can't make my table rows size small/thin, why can't I just set the max-height?
I want it to have no space at the top and bottom for every row, maybe only 1-2px, but how?
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<table class="table table-bordered table-hover">
<thead class="thead-dark" id="TableTitle">
<tr>
<th id="Testplans" style="width:30%;" scope="col">Testplans for <?php echo $ProjectsList;?></th>
<th id="PF" style="width: 200px;" scope="col">Status</th>
<th id="Date" style="width: 250px;" scope="col">Date</th>
<th id="Version" scope="col">Version</th>
</tr>
</thead>
<tbody>
<tr>
<td class='font-weight-bold' scope='row' id=".$testPlanData['TestJobId'].">
<a target='_blank' href='TestResults?ID=".$testPlanData['TestJobId']."'>
Test
</a>
</td>
<td id=".$testPlanData['TestJobId'].">
<div class='ml-1 d-flex'>
<div title='Not applicable'>
<button onclick='toggleHideShowTC(this.id)' id='na-".$testPlanData['TestJobId']."' style='white-space: nowrap;' title='Passed' class='btn btn-dark rounded text-light font-weight-bold h6 p-1 d-inline-block'>
234 N/A
</button>
</div>
</div>
<br>
<div class='d-flex justify-content-start'></div>
</td>
<td id=".$testPlanData['TestJobId']."><small class='text-muted'>12:13:1322</small></td>
<td id=".$testPlanData['TestJobId'].">
<small class='text-muted'> 123 </small>
</td>
</tr>
</tbody>
</table>
So more like this:
EDIT 12px padding?
The space appears, because inside your
<td id=".$testPlanData['TestJobId'].">
<div class='ml-1 d-flex'>
<div title='Not applicable'>
<button onclick='toggleHideShowTC(this.id)' id='na-".$testPlanData[' TestJobId ']."' style='white-space: nowrap;' title='Passed' class='btn btn-dark rounded text-light font-weight-bold h6 p-1 d-inline-block'>
234 N/A
</button>
</div>
</div>
<br>
<div class='d-flex justify-content-start'></div>
</td>
you have these two lines
<br>
<div class='d-flex justify-content-start'></div>
Remove them and it looks much better. Also you could remove the margin-bottom from your .btn class.
You can easily overwrite Bootstrap styles. I've changed the default .75rem padding to 0px. Also middle vertical aligning looks better to me. Check the style element.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<style>
.table td, .table th {
padding: 0px;
vertical-align: middle;
}
</style>
<table class="table table-bordered table-hover">
<thead class="thead-dark" id="TableTitle">
<tr>
<th id="Testplans" style="width:30%;" scope="col">Testplans for <?php echo $ProjectsList;?></th>
<th id="PF" style="width: 200px;" scope="col">Status</th>
<th id="Date" style="width: 250px;" scope="col">Date</th>
<th id="Version" scope="col">Version</th>
</tr>
</thead>
<tbody>
<tr>
<td class='font-weight-bold' scope='row' id=".$testPlanData['TestJobId'].">
<a target='_blank' href='TestResults?ID=".$testPlanData['TestJobId']."'>
Test
</a>
</td>
<td id=".$testPlanData['TestJobId'].">
<div class='ml-1 d-flex'>
<div title='Not applicable'>
<button onclick='toggleHideShowTC(this.id)' id='na-".$testPlanData['TestJobId']."' style='white-space: nowrap;' title='Passed' class='btn btn-dark rounded text-light font-weight-bold h6 p-1 d-inline-block'>
234 N/A
</button>
</div>
</div>
<br>
<div class='d-flex justify-content-start'></div>
</td>
<td id=".$testPlanData['TestJobId']."><small class='text-muted'>12:13:1322</small></td>
<td id=".$testPlanData['TestJobId'].">
<small class='text-muted'> 123 </small>
</td>
</tr>
<tr>
<td class='font-weight-bold' scope='row' id=".$testPlanData['TestJobId'].">
<a target='_blank' href='TestResults?ID=".$testPlanData['TestJobId']."'>
Test
</a>
</td>
<td id=".$testPlanData['TestJobId'].">
<div class='ml-1 d-flex'>
<div title='Not applicable'>
<button onclick='toggleHideShowTC(this.id)' id='na-".$testPlanData['TestJobId']."' style='white-space: nowrap;' title='Passed' class='btn btn-dark rounded text-light font-weight-bold h6 p-1 d-inline-block'>
234 N/A
</button>
</div>
</div>
<br>
<div class='d-flex justify-content-start'></div>
</td>
<td id=".$testPlanData['TestJobId']."><small class='text-muted'>12:13:1322</small></td>
<td id=".$testPlanData['TestJobId'].">
<small class='text-muted'> 123 </small>
</td>
</tr>
<tr>
<td class='font-weight-bold' scope='row' id=".$testPlanData['TestJobId'].">
<a target='_blank' href='TestResults?ID=".$testPlanData['TestJobId']."'>
Test
</a>
</td>
<td id=".$testPlanData['TestJobId'].">
<div class='ml-1 d-flex'>
<div title='Not applicable'>
<button onclick='toggleHideShowTC(this.id)' id='na-".$testPlanData['TestJobId']."' style='white-space: nowrap;' title='Passed' class='btn btn-dark rounded text-light font-weight-bold h6 p-1 d-inline-block'>
234 N/A
</button>
</div>
</div>
<br>
<div class='d-flex justify-content-start'></div>
</td>
<td id=".$testPlanData['TestJobId']."><small class='text-muted'>12:13:1322</small></td>
<td id=".$testPlanData['TestJobId'].">
<small class='text-muted'> 123 </small>
</td>
</tr>
</tbody>
</table>

Bootstrap 5 table buttons placement

I have a table that is supposed to represent a CRUD application in which there is a person's details as well as an edit and delete button. The two buttons (as well as any other buttons that may be added later) are intended to display side by side of each other. This works on larger screen sizes, however on smaller devices, the buttons stack on top of each other.
How do I make it so that the buttons remain to the side of each other on smaller screen sizes?
<head>
<!--Material Icons -->
<link href="https://fonts.googleapis.com/css2?family=Material+Icons" rel="stylesheet" />
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous" />
<title>Hello, world!</title>
</head>
<body class="bg-light">
<!-- Main body -->
<div class="container">
<!-- Table -->
<div class="table-responsive">
<table class="table table-fit mt-5 table-dark table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>myFirstName</td>
<td>myLastName</td>
<td>#myHandle</td>
<td>
<a type="button" class="btn">
<i class="material-icons text-warning">edit</i>
</a>
<a type="button" class="btn">
<i class="material-icons text-danger">delete</i>
</a>
</td>
</tr>
<tr>
<th scope="row">1</th>
<td>anotherFirstName</td>
<td>anotherLastName</td>
<td>#anotherHandle</td>
<td>
<a type="button" class="btn">
<i class="material-icons text-warning">edit</i>
</a>
<a type="button" class="btn">
<i class="material-icons text-danger">delete</i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
The issue has been solved by putting both buttons inside of a flex container
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--Material Icons -->
<link
href="https://fonts.googleapis.com/css2?family=Material+Icons"
rel="stylesheet"
/>
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<title>Hello, world!</title>
</head>
<body class="bg-light">
<!-- Main body -->
<div class="container">
<!-- Table -->
<div class="table-responsive" >
<table class="table table-fit mt-5 table-dark table-striped" >
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>myFirstName</td>
<td>myLastName</td>
<td>#myHandle</td>
<td >
<div class="d-flex flex-row mb-3">
<div ><button type="button" class="btn">
<i class="material-icons text-warning">edit</i>
</button></div>
<div ><button type="button" class="btn">
<i class="material-icons text-danger">delete</i>
</button></div>
</div>
</td>
</tr>
<tr>
<th scope="row">2</th>
<td>anotherFirstName</td>
<td>anotherLastName</td>
<td>#anotherHandle</td>
<td >
<div class="d-flex flex-row mb-3">
<div ><button type="button" class="btn">
<i class="material-icons text-warning">edit</i>
</button></div>
<div ><button type="button" class="btn">
<i class="material-icons text-danger">delete</i>
</button></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"
></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/#popperjs/core#2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
-->
</body>
</html>
That's a really painful situation every developer faced during such use cases.
Nevertheless, there are a couple of solutions (I would say UX ) you should consider:
If there is a high chance of increasing action buttons, you can simply group them all and add more buttons to display the list of action items:
Refer the screenshot
If you don't want to go with option 1., you can choose to convert your table into an accordion after specific breakpoints where the user can see the full name and all the action items or make it a card-based layout to display all the records.
Display all the action items on the hover of the row. All the action items would be slide/fade from/on the right side on top of the row. Similar to Gmail.

navbar isn't showing anything

I'm trying to have a navbar with 3 links. In each tab, I want to show a table and when I click on another link I want to show another table.
I'm trying to do this with the code below, but it's not working. I'm not getting anything displayed on the page.
Do you understand why it's not working?
html:
<body>
<div class="container">
<div class=".md-xs-4">
<ul class="nav nav-pills">
<li>
Table Link
</li>
<li>
Tabl2 Link
</li>
</ul>
</div>
<div class=".md-xs-4">
<div class="tab-content">
<div class="tab-pane fade" id="Table">
<table class="table" style="border: 1px solid #ddd;">
<td>a</td>
<td>b</td>
</table>
<div class="tab-content">
<div class="tab-pane fade" id="Table2">
<table class="table" style="border: 1px solid #ddd;">
<td>a</td>
<td>b</td>
</table>
</div>
</div>
</div>
</body>
https://jsfiddle.net/z2kLaxaj/
Your syntax is a bit off - and you're missing jQuery in your fiddle.
Add the following code to your <head> before loading bootstrap.js:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
And your code should look something like this:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="container">
<ul class="nav nav-pills">
<li class="active"><a data-toggle="pill" href="#table1">Table Link</a>
</li>
<li><a data-toggle="pill" href="#table2">Table Link 2</a>
</li>
</ul>
<div class="tab-content">
<div id="table1" class="tab-pane fade in active">
<table class="table" style="border: 1px solid #ddd;">
<td>a</td>
<td>b</td>
</table>
</div>
<div id="table2" class="tab-pane fade">
<table class="table" style="border: 1px solid #ddd;">
<td>a</td>
<td>b</td>
</table>
</div>
</div>
</div>

div responsiveness in twitter bootstrap

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div class="row">
<div class="span4">
Image:<img src="Tulips.jpg" ></img>
</div>
<div class="span4 ">
<table class="table borderless">
<tr>
<td><b>Test image</b></td>
</tr>
<tr>
<td>testing testing</td>
</tr>
<tr>
<td>120$</td>
</tr>
<tr>
<td>
<button class="btn btn-primary" type="button">Default button</button>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>
My output1:
and when i test for its responsiveness by using a mobile phone i get an output2 as :
Can anybody help me with the code i have posted to make it look as output1 even for mobile view...thank you...
Here you go:
<div class="row">
<div class="col-xs-6">Image:
<img class="img-responsive" src="Tulips.jpg"></img>
</div>
<div class="col-xs-6 ">
<table class="table borderless">
<tr>
<td><b>Test image</b>
</td>
</tr>
<tr>
<td>testing testing</td>
</tr>
<tr>
<td>120$</td>
</tr>
<tr>
<td>
<button class="btn btn-primary" type="button">Default button</button>
</td>
</tr>
</table>
</div>
</div>
I got the answer:
<div class="row">
<table class="table borderless">
<tr>
<td>
<div class="span4">
Image:<img src="Tulips.jpg" ></img>
</div>
</td>
<td>
<div class="span4 ">
<table class="table borderless">
<tr>
<td><b>Test image</b></td>
</tr>
<tr>
<td>testing testing</td>
</tr>
<tr>
<td>120$</td>
</tr>
<tr>
<td>
<button class="btn btn-primary" type="button">Default button</button>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
thank you for you consideration..