table width doesn't work when i use colspan. i need colspan. and width size like 100px; or 10% without colspan bottom source code width size works. how do i edit? may i ask? help please.
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
table {
table-layout: fixed;
word-wrap: break-word;
width: 30%;
}
</style>
</head>
<body>
<table>
<tr>
<td colspan="2">abc</td>
</tr>
<tr class="table table-bordered">
<td style="width: 10%;" /td>1</td>
<td style="width: 20%;" /td>2</td>
</tr>
</table>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<html>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
table {
width: 100%;
border:1px solid;
}
td{
border:1px solid;
}
</style>
</head>
<body>
<table>
<tr>
<td colspan="2">abc</td>
</tr>
<tr >
<td style="width: 40%;">1</td>
<td style="width: 60%;">2</td>
</tr>
</table>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
I have changed it now, notice that i have taken away the table layout:fixed tag and it worked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With