Topic: Column width in tables is not behaving as expected
Anastassia Etropolski
free
asked 8 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Test</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<table class="table">
<thead>
<tr>
<th class="col-lg-3">Invoice</th>
<th class="col-lg-3">Date</th>
<th class="col-lg-3">Amount</th>
<th class="col-lg-3">Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>12345</td>
<td>Feb 1, 2014</td>
<td>$45.00</td>
<td>Owing</td>
</tr>
<tr>
<td>67890</td>
<td>Jan 30, 2014</td>
<td>$19.99</td>
<td>Overdue</td>
</tr>
</tbody>
</table>
</body>
</html>
2. Uses Bootstrap CDN link obtained here
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Test</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<table class="table">
<thead>
<tr>
<th class="col-lg-3">Invoice</th>
<th class="col-lg-3">Date</th>
<th class="col-lg-3">Amount</th>
<th class="col-lg-3">Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>12345</td>
<td>Feb 1, 2014</td>
<td>$45.00</td>
<td>Owing</td>
</tr>
<tr>
<td>67890</td>
<td>Jan 30, 2014</td>
<td>$19.99</td>
<td>Overdue</td>
</tr>
</tbody>
</table>
</body>
</html>
Marta Wierzbicka
free
answered 8 years ago
Anastassia Etropolski
free
answered 8 years ago
Marta Wierzbicka
free
answered 8 years ago
<div class="container">
<div class="row">
<div class="col-md-6">
<table class="table">
<thead>
<tr>
<th>Invoice</th>
<th>Date</th>
<th>Amount</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>12345</td>
<td>Feb 1, 2014</td>
<td>$45.00</td>
<td>Owing</td>
</tr>
<tr>
<td>67890</td>
<td>Jan 30, 2014</td>
<td>$19.99</td>
<td>Overdue</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
Best,
Marta
Anastassia Etropolski
free
answered 8 years ago
It looks like I'm using a different version. The README file says
"Material Design for Bootstrap
Version: MDB Free 4.3.2"
Marta Wierzbicka
free
answered 8 years ago
. Does your table display in the same way? If not, please paste here a screen of your table. And write me here what exactly is your version of MDB - you can see this e.g. on the top of mdb.css file, like here:
.
Best,
Marta
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- ForumUser: Free
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: Yes