That's an old way of placing a border around the table. The better way to place a border around a table and cells is by using CSS:
table, td {
border-collapse: separate;
border: 1px solid #999;
}
jsFiddle example
Answer from j08691 on Stack OverflowThat's an old way of placing a border around the table. The better way to place a border around a table and cells is by using CSS:
table, td {
border-collapse: separate;
border: 1px solid #999;
}
jsFiddle example
I'm not here to debate on the old way versus the new way or which is better. Just saying...
As far as I know the border attribute on the table element is still standard in HTML5 and has not been "phased out." (See: http://www.w3schools.com/html5/tag_table.asp and http://www.w3.org/TR/html5/tabular-data.html#attr-table-border)
Though, it could be, I highly doubt it's a DOCTYPE issue. I tried your example code (I added an end tag to your open div), and the borders showed up just fine in various current browsers including Chrome.
I think you probably have some global CSS or something else in your code that you are using and haven't specifically mentioned here.
To clarify I used this exact code with the strict DTD and everything:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>test</title>
</head>
<body>
<div id="a">
<table id="main_table" border="1">
<tr>
<th>Jobs</th>
<th>Customers</th>
</tr>
</table>
</div>
</body>
</html>
Borders showed up in FF, IE8, and Chrome.
HTML5 supports 1 or empty string for this attribute.
So this should be an easy answer but when you use CSS table and td its doesn't quite match border="1" 100% (But its very close)

My way uses this:
table {
border: 1px outset grey;
padding: 1px
}
td {
border: thin inset grey;
margin: 1;
}
Apply it to the td elements instead of table element.
Use border-collapse: collapse
table {
border-collapse: collapse;
}
The border-collapse property sets whether the table borders are collapsed into a single border or detached as in standard HTML.
table {
border-collapse: collapse;
border:1px solid #69899F;
}
table td{
border:1px dotted #000000;
padding:5px;
}
table td:first-child{
border-left:0px solid #000000;
}
table th{
border:2px solid #69899F;
padding:5px;
}
<table class="table table-bordered">
<thead>
<tr>
<th>Sr No</th>
<th>Product Name</th>
<th>Quantity</th>
<th>Add</th>
</tr>
</thead>
<tbody class="allign-center">
<tr>
<td>1</td>
<td class="proname">MARHABA SAFOOF TABKHIR</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
<tr>
<td>2</td>
<td class="proname">MARHABA JAWARISH SHAHI AMBRI</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
<tr>
<td>3</td>
<td class="proname">MARHABA JAWARISH ZAROONI SADA</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
<tr>
<td>4</td>
<td class="proname">MARHABA SAFOOF HAZAM</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
</tbody>
</table>
Maybe this is what you're looking for. Give it a shot.
table {
border:1px solid #CCC;
border-collapse:collapse;
}
td {
border:none;
}
<table class="table table-bordered">
<thead>
<tr>
<th>Sr No</th>
<th>Product Name</th>
<th>Quantity</th>
<th>Add</th>
</tr>
</thead>
<tbody class="allign-center">
<tr>
<td>1</td>
<td class="proname">MARHABA SAFOOF TABKHIR</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
<tr>
<td>2</td>
<td class="proname">MARHABA JAWARISH SHAHI AMBRI</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
<tr>
<td>3</td>
<td class="proname">MARHABA JAWARISH ZAROONI SADA</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
<tr>
<td>4</td>
<td class="proname">MARHABA SAFOOF HAZAM</td>
<td><input class="qty" type="number"></td>
<td><button class="btn btn-xs btn-success" onclick=""><i class="fa fa-arrow-right"></i>Add</button></td>
</tr>
</tbody>
</table>