Hiding rows in a table HTML - html

I have a table in HTML that gets populated with data. However if some of the data is not filled in - which it isn't always, then the table will display, but with empty rows. I'm trying to get these rows that are empty to be hidden. I've tried a few things and nothing has seemed to work as of yet, does anybody have any ideas?
Here is my HTML code for the table:
<table style= width: 1300px;" border="1" cellpadding="1" cellspacing="0">
<tbody>
<tr>
<td colspan="1" rowspan="2" style="width: 75px; text-align: center;"><span style="font-size: 16px;">Sample Number</span></td>
<td colspan="1" rowspan="2" style="width: 50px; text-align: center;"><span style="font-size: 16px;">Sample Type</span></td>
<td colspan="1" rowspan="2" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Pump No</span></td>
<td colspan="1" rowspan="2" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Cowl No</span></td>
<td colspan="1" rowspan="2" style="width: 200px; text-align: center;"><span style="font-size: 16px;">Sample Location</span></td>
<td colspan="2" rowspan="1" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Sampling Times</span></td>
<td colspan="1" rowspan="2" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Duration (mins)</span></td>
<td colspan="2" rowspan="1" style="text-align: center;"><span style="font-size: 16px;">Flow
Rates (l/min)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Mean<br>
Flow Rate (l/min)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Sample Volume (litres)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Fibres Counted</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Graticule Fields</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Limit of Detection (f/ml)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Calculated Result (f/ml)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Recorded Result (f/ml)</span></td>
</tr>
<tr>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Start</span></td>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Finish</span></td>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Start</span></td>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Finish</span></td>
</tr>
<tr>
<td><span style="font-size: 16px;"><%SampleNumber_1%></span></td>
<td><span style="font-size: 16px;"><%TypeofTest_1%></span></td>
<td><span style="font-size: 16px;"><%PumpNo_1%></span></td>
<td><span style="font-size: 16px;"><%CowlNo_1%></span></td>
<td><span style="font-size: 16px;"><%SampleLocation_1%></span></td>
<td><span style="font-size: 16px;"><%SampleStart_1%></span></td>
<td><span style="font-size: 16px;"><%SampleFinish_1%></span></td>
<td><span style="font-size: 16px;"><%SampleDuration_1%></span></td>
<td><span style="font-size: 16px;"><%FlowRateStart_1%></span></td>
<td><span style="font-size: 16px;"><%FlowRateFinish_1%></span></td>
<td><span style="font-size: 16px;"><%FlowRatelminMean_1%></span></td>
<td><span style="font-size: 16px;"><%SampleVolumelitres_1%></span></td>
<td><span style="font-size: 16px;"><%FibresCount_1%></span></td>
<td><span style="font-size: 16px;"><%GraticuleFields_1%></span></td>
<td><span style="font-size: 16px;"><%Limit_1%></span></td>
<td><span style="font-size: 16px;"><%CalculatedResult_m1%></span></td>
<td><span style="font-size: 16px;"><%ReportedResult_1%></span></td>
</tr>
<tr>
<td><span style="font-size: 16px;"><%SampleNumber_2%></span></td>
<td><span style="font-size: 16px;"><%TypeofTest_2%></span></td>
<td><span style="font-size: 16px;"><%PumpNo_2%></span></td>
<td><span style="font-size: 16px;"><%CowlNo_2%></span></td>
<td><span style="font-size: 16px;"><%SampleLocation_2%></span></td>
<td><span style="font-size: 16px;"><%SampleStart_2%></span></td>
<td><span style="font-size: 16px;"><%SampleFinish_2%></span></td>
<td><span style="font-size: 16px;"><%SampleDuration_2%></span></td>
<td><span style="font-size: 16px;"><%FlowRateStart_2%></span></td>
<td><span style="font-size: 16px;"><%FlowRateFinish_2%></span></td>
<td><span style="font-size: 16px;"><%FlowRatelminMean_2%></span></td>
<td><span style="font-size: 16px;"><%SampleVolumelitres_2%></span></td>
<td><span style="font-size: 16px;"><%FibresCount_2%></span></td>
<td><span style="font-size: 16px;"><%GraticuleFields_2%></span></td>
<td><span style="font-size: 16px;"><%Limit_2%></span></td>
<td><span style="font-size: 16px;"><%CalculatedResult_m2%></span></td>
<td><span style="font-size: 16px;"><%ReportedResult_2%></span></td>
</tr>
For example, imagine only the first row was filled in and the second therefore not need be displayed.
Edit
The table gets populated using a mobile application, which you insert data into. The HTML is then a template so that it can be printed. To get this information from the app, you must put in the <% ... %> tags, the stuff inside the tag is the ID of a text-box within the app, for example. If you load this into a web browser it will only display the tags, if this is loaded in the mobile app, it will display information in the table. However if these text-boxes or drop-downs (whatever they may be) haven't been filled in then the table will still load, but with no data in it. I therefore need the blank rows with no data in, to be hidden.
Here is a link to my table and how it displays
http://screenpresso.com/=5xMwd The first image is how it displays within a browser and will always show the tag. However the second image is within the app and will show the data that the text boxes have in them, as mentioned above. As you can see if the text-boxes are blank there is blank rows.
Thanks in advance.

Here is a working DEMO
CSS:
table, table td {border: 1px solid #f00; height: 20px;}
jQuery
$('#start').click(function() {
var rows = $('table').find('tr');
$.each(rows, function(idx, trobj) {
var hasvalue = false;
var spans = $(this).find('td span');
$.each(spans, function(spanidx, spanobj) {
//console.log($(obj).html() );
if ($(spanobj).html() != '') {
hasvalue = true;
}
});
if (!hasvalue) {
$(this).hide();
}
});
});
Test HTML
<table style= "width: 1300px; border-collapse: collapse;" border="1" cellpadding="1" cellspacing="0">
<tbody>
<tr>
<td colspan="1" rowspan="2" style="width: 75px; text-align: center;"><span style="font-size: 16px;">Sample Number</span></td>
<td colspan="1" rowspan="2" style="width: 50px; text-align: center;"><span style="font-size: 16px;">Sample Type</span></td>
<td colspan="1" rowspan="2" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Pump No</span></td>
<td colspan="1" rowspan="2" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Cowl No</span></td>
<td colspan="1" rowspan="2" style="width: 200px; text-align: center;"><span style="font-size: 16px;">Sample Location</span></td>
<td colspan="2" rowspan="1" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Sampling Times</span></td>
<td colspan="1" rowspan="2" style="width: 60px; text-align: center;"><span style="font-size: 16px;">Duration (mins)</span></td>
<td colspan="2" rowspan="1" style="text-align: center;"><span style="font-size: 16px;">Flow
Rates (l/min)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Mean<br>
Flow Rate (l/min)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Sample Volume (litres)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Fibres Counted</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Graticule Fields</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Limit of Detection (f/ml)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Calculated Result (f/ml)</span></td>
<td colspan="1" rowspan="2" style="width: 70px; text-align: center;"><span style="font-size: 16px;">Recorded Result (f/ml)</span></td>
</tr>
<tr>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Start</span></td>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Finish</span></td>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Start</span></td>
<td style="width: 40px; text-align: center;"><span style="font-size: 16px;">Finish</span></td>
</tr>
<tr>
<td><span style="font-size: 16px;"><%SampleNumber_1%></span></td>
<td><span style="font-size: 16px;"><%TypeofTest_1%></span></td>
<td><span style="font-size: 16px;"><%PumpNo_1%></span></td>
<td><span style="font-size: 16px;"><%CowlNo_1%></span></td>
<td><span style="font-size: 16px;"><%SampleLocation_1%></span></td>
<td><span style="font-size: 16px;"><%SampleStart_1%></span></td>
<td><span style="font-size: 16px;"><%SampleFinish_1%></span></td>
<td><span style="font-size: 16px;"><%SampleDuration_1%></span></td>
<td><span style="font-size: 16px;"><%FlowRateStart_1%></span></td>
<td><span style="font-size: 16px;"><%FlowRateFinish_1%></span></td>
<td><span style="font-size: 16px;"><%FlowRatelminMean_1%></span></td>
<td><span style="font-size: 16px;"><%SampleVolumelitres_1%></span></td>
<td><span style="font-size: 16px;"><%FibresCount_1%></span></td>
<td><span style="font-size: 16px;"><%GraticuleFields_1%></span></td>
<td><span style="font-size: 16px;"><%Limit_1%></span></td>
<td><span style="font-size: 16px;"><%CalculatedResult_m1%></span></td>
<td><span style="font-size: 16px;"><%ReportedResult_1%></span></td>
</tr>
<tr>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
<td><span style="font-size: 16px;"></span></td>
</tr>
</table>
<button id="start">START</button>
EDIT:
Ok, so based on OP edit, this is another jsfiddle: http://jsfiddle.net/b7pexhh6/8/

Related

The html table is showing different cell width in each page

I was trying to list some data, the first table may contain first 10 data of the list remaining will show in the next table. I achieve this by looping the same table. But the table is showing different cell width in each page.
The first page shows table like this,
The second page shows the table like this,
The code i used is
<html>
<head>
<style type="text/css" media="print">
#media print {
html, body {
color: black;
margin: 0 !important;
padding: 0 !important;
width: 100%;
height: 100vh !important;
/* overflow: hidden !important; */
font-size: 15px;
}
#page {
page-break-inside: avoid;
size: A4 landscape;
margin: 10;
}
.footer {
display: table-cell;
vertical-align: bottom;
}
input[type=checkbox], input[type=radio] {
opacity: 1 !important;
}
}
</style>
<style type="text/css">
page {
background: white;
display: block;
margin: 0 auto;
margin-bottom: 0.5cm;
box-shadow: 0 0 0.5cm rgba(0, 0, 0, 0.5);
}
page[size="A4"] {
width: 21cm;
height: 29.7cm;
}
page[size="A4"][layout="landscape"] {
width: 29.7cm;
height: 21cm;
}
.table-wtotbr {
width: 100%;
}
.table-wtbr {
width: 100%;
}
.table-wtotbr th, td {
border-bottom: 1px solid black;
}
.table-wtbr th, td {
border: 1px solid black;
}
.container-table {
color: black;
width: 100%;
height: 100%;
font-size: 11px;
}
.footer {
position: fixed;
bottom: 0;
width: 100%;
}
.checkbox {
width:12px;
height:12px;
border: 1px solid #000;
display: inline-block;
}
</style>
</head>
<body>
<%
int rwln = Integer.parseInt(request.getAttribute("rwln").toString());
int cnt = 0;
int cntt = 0;
int listlngth = 9;
int begin = 0;
int mnlpcnt = rwln / 10;
double mlopct = (double) rwln / 10;
%>
<c:set value="<%=cntt%>" var="cntt"></c:set>
<c:set value="<%=cnt%>" var="cnt"></c:set>
<c:set value="<%=mnlpcnt%>" var="mnlpcnt"></c:set>
<c:set value="<%=listlngth%>" var="listlngth"></c:set>
<c:set value="<%=begin%>" var="begin"></c:set>
<!-- getting current date -->
<%
Date dNow = new Date();
SimpleDateFormat ft = new SimpleDateFormat("dd.MM.yyyy");
String cdate = ft.format(dNow);
%>
<!-- /getting current date -->
<jsp:useBean id="today" class="java.util.Date" />
<c:forEach var="kk" begin="0" end="<%=mnlpcnt%>">
<page size="A4" layout="landscape">
<div class="container-table">
<table class="table-wtotbr">
<tr>
<td style="vertical-align: middle; text-align: center;">
<img alt="logo" src="assets/images/logo.png" height="40px">
</td>
<td style="text-align: center; width: 60%; font-size: 20px;">
<b>Comapany</b>
</td>
</tr>
</table>
<table class="table-wtotbr">
<tr height="10px">
<td rowspan="2" style="text-align: center; vertical-align: middle;">Job
Travel Card</td>
<td style="widtd: 10%;">JTC No:<%=request.getAttribute("jtcnum")%></td>
</tr>
<tr height="10px">
<td>Date</td>
</tr>
</table>
<table class="table-wtotbr">
<tr height="10px">
<td style="text-align: left; font-size: 8px;" colspan="2">Project
Number: <%=request.getAttribute("prjnno")%> </td>
<td style="text-align: left; font-size: 8px;" colspan="2">Unit
No. / Tag No.:</td>
</tr>
<tr height="10px">
<td style="text-align: left;" colspan="3">Area Number:</td>
<td style="text-align: left;">Material Class: <%=request.getAttribute("mclass")%></td>
</tr>
<tr height="10px">
<td style="text-align: left;">Drawing No: / ISO Number: <%=request.getAttribute("drwno")%></td>
<td style="text-align: left;" widtd="25%">JC No: <%=request.getAttribute("miv")%></td>
<td style="text-align: left;">Sheet No:</td>
<td style="text-align: left;">Rev. No.:</td>
</tr>
<tr height="10px">
<td style="text-align: left; font-size: 8px;">Item Description:</td>
<td style="text-align: left; font-size: 8px;" colspan="3">ITP
Stage Nos.:</td>
</tr>
</table>
<!-- Fitup data table-sm -->
<table class="table-wtbr">
<tr height="10px">
<td rowspan="12" style="text-align: center; vertical-align: middle;">
<span class="verticaltext"> Fabrication Assembly Fit-Up </span>
</td>
<td style="text-align: center; vertical-align: middle;" rowspan="2">Weld/joint
No</td>
<td colspan="2" style="text-align: center;">Material Spec Grade</td>
<td style="text-align: center; vertical-align: middle;" rowspan="2">Size</td>
<td style="text-align: center; vertical-align: middle;" rowspan="2">Thickness</td>
<td colspan="2" style="text-align: center;">Heat/Plate/TestNo</td>
<td style="text-align: center; vertical-align: middle;" rowspan="2">Welder
No. for tracking</td>
<td colspan="2" style="text-align: center;">Fitup Result</td>
<td style="text-align: center; vertical-align: middle;" rowspan="2">Date</td>
<td style="text-align: center; vertical-align: middle;" rowspan="2" width="5%">Sign</td>
</tr>
<tr height="10px">
<td style="text-align: center; font-size: 8px;" width="10%">Material
1</td>
<td style="text-align: center; font-size: 8px;" width="10%">Material
2</td>
<td style="text-align: center; font-size: 8px;" width="10%">Material
1</td>
<td style="text-align: center; font-size: 8px;" width="10%">Material
2</td>
<td style="text-align: center; font-size: 8px;">Accept</td>
<td style="text-align: center; font-size: 8px;">Reject</td>
</tr>
<c:choose>
<c:when test="${mnlpcnt <1 }">
<c:forEach var="jdata" items="${jtcdata}">
<tr height="10px" style="font-size: 12px;">
<td style="text-align: center;" width="7%">${jdata.getJointno()}</td>
<td style="text-align: center;" width="7%">${jdata.getItem1()}</td>
<td style="text-align: center;" width="7%">${jdata.getItem2()}</td>
<td style="text-align: center;" width="7%">${jdata.getDia()}</td>
<td style="text-align: center;" width="7%">${jdata.getThick()}</td>
<td style="text-align: center;" width="7%"></td>
<td style="text-align: center;" width="7%"></td>
<td style="text-align: center;" width="7%"></td>
<td style="text-align: center;" width="7%"></td>
<td style="text-align: center;" width="7%"></td>
<td style="text-align: center;" width="7%"></td>
<td style="text-align: center;" width="7%"></td>
</tr>
</c:forEach>
</c:when>
<c:when test="${mnlpcnt >= 1 }">
<c:forEach var="qq" begin="${begin}" end="${listlngth}">
<tr height="10px" style="font-size: 12px;">
<td style="text-align: center;">${jtcdata[qq].getJointno()}</td>
<td style="text-align: center;">${jtcdata[qq].getItem1()}</td>
<td style="text-align: center;">${jtcdata[qq].getItem2()}</td>
<td style="text-align: center;">${jtcdata[qq].getDia()}</td>
<td style="text-align: center;">${jtcdata[qq].getThick()}</td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
</tr>
</c:forEach>
</c:when>
</c:choose>
<tr>
<td colspan="5" style="font-size: 10px;">Name & Signature of
fabrication foreman</td>
<td colspan="2" style="font-size: 10px;">Released to</td>
<td colspan="1" style="font-size: 10px;">
<div class="checkbox"></div>
QC/NDE/DIM.</td>
<td colspan="3" style="font-size: 10px;"><div class="checkbox"></div>
Welding</td>
<td colspan="4" style="font-size: 10px;"><div class="checkbox"></div>
Fabrication/Assembly</td>
</tr>
<tr>
<td colspan="7" style="font-size: 10px;">Date</td>
<td colspan="7" style="font-size: 10px;">Date</td>
</tr>
</table>
<!-- welding data -->
<table class="table-wtbr">
<tr heigth="10px">
<td rowspan="13" style="text-align: center; vertical-align: middle;">
<span class="verticaltext"> Welding Details </span>
</td>
<td style="text-align: center; vertical-align: middle;" width="7%"
rowspan="3">Joint No</td>
<td style="text-align: center; vertical-align: middle;" rowspan="3"
width="15%">WPS No.</td>
<td colspan="3" style="text-align: center;">Welding Process</td>
<td colspan="3" style="text-align: center;">Welder/Operation
No.</td>
<td colspan="2" rowspan="2"
style="text-align: center; vertical-align: middle;">Visual
Inspection</td>
<td style="text-align: center; vertical-align: middle;" rowspan="3"
width="5%">Date</td>
<td style="text-align: center; vertical-align: middle;" rowspan="3"
width="5%">Sign</td>
</tr>
<tr heigth="10px">
<td colspan="3" style="text-align: center;">Passes</td>
<td colspan="3" style="text-align: center;">Passes</td>
</tr>
<tr heigth="10px">
<td style="text-align: center; font-size: 8px;" width="10%">Root/Hot</td>
<td style="text-align: center; font-size: 8px;" width="10%">Fill</td>
<td style="text-align: center; font-size: 8px;" width="10%">Cap</td>
<td style="text-align: center; font-size: 8px;" width="10%">Root/Hot</td>
<td style="text-align: center; font-size: 8px;" width="10%">Fill</td>
<td style="text-align: center; font-size: 8px;" width="10%">Cap</td>
<td style="text-align: center; font-size: 8px;" width="4%">Accept</td>
<td style="text-align: center; font-size: 8px;" width="4%">Reject</td>
</tr>
<c:choose>
<c:when test="${mnlpcnt <1 }">
<c:forEach var="jdata" items="${jtcdata}">
<tr height="10px" style="font-size: 12px;">
<td style="text-align: center;">${jdata.getJointno()}</td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
</tr>
</c:forEach>
</c:when>
<c:when test="${mnlpcnt >= 1 }">
<c:forEach var="pp" begin="${begin}" end="${listlngth}">
<tr height="10px" style="font-size: 12px;">
<td style="text-align: center;">${jtcdata[pp].getJointno()}</td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
<td style="text-align: center;"></td>
</tr>
</c:forEach>
</c:when>
</c:choose>
<tr>
<td colspan="4" style="font-size: 10px;">Name & Signature of
fabrication foreman</td>
<td colspan="2" style="font-size: 10px;">Released to</td>
<td colspan="1" style="font-size: 10px;"><div class="checkbox"></div>
QC/NDE/DIM.</td>
<td colspan="2" style="font-size: 10px;"><div class="checkbox"></div>
Welding</td>
<td colspan="5" style="font-size: 10px;"><div class="checkbox"></div>
Fabrication/Assembly</td>
</tr>
<tr>
<td colspan="14" style="font-size: 10px;">Name & Signature of
QC Personel</td>
</tr>
<tr>
<td colspan="7" style="font-size: 10px;">Date</td>
<td colspan="7" style="font-size: 10px;">Date</td>
</tr>
</table>
<div class="footer">
<div style="float: left;">
<!--
<%=request.getAttribute("prjnno")%>-JTC-<%=request.getAttribute("jtcnum")%>-PIP-REV-01
-->
10636-JTC-276-PIP-REV-01
</div>
<div style="float: right;">
<%=cdate%>
</div>
</div>
</div>
</page>
<%
begin = listlngth+1;
listlngth = listlngth+9;
%>
<c:set value="<%=listlngth%>" var="listlngth"></c:set>
<c:set value="<%=begin%>" var="begin"></c:set>
</c:forEach>
</body>
</html>
Can anyone help me to solving this issue.
Thank you in advance.

I have a large table with many colspans and need the column widths to be equal

I cannot get the columns in this data table to be equal width. I'm attaching the HTML file. The goal is to get the GAW 325, GAW 331, GAW 333, GAW 334, GAW 337, and GAW 338 to be equal widths. The rest of the cells can resize as needed, there are no other requirements for them. All CSS needs to be inline as I don't have access to the stylesheet.
I tried using fixed-width layout, manually setting the table and TD and TR tags to various widths using inline HTML, CSS, pixels, and percentages.
<table align="left" border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF; " rowspan="2" valign="bottom">
<p>Property</p>
</td>
<td bgcolor="#5e86a0" style="color:#FFFFFF; " colspan="11" >
<p align="center">Material Sets</p>
</td>
</tr>
<tr>
<td>
<p align="center">GAW 325</p>
</td>
<td style="" colspan="3">
<p align="center">GAW 331<sup>a</sup></p>
</td>
<td style="" colspan="2">
<p align="center">GAW 333</p>
</td>
<td style="" colspan="2">
<p align="center">GAW 334<sup>a</sup></p>
</td>
<td style="" colspan="2">
<p align="center">GAW 337<sup>a</sup></p>
</td>
<td style="">
<p align="center">GAW 338</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>IP Rating<sup>b</sup></p>
</td>
<td colspan="11" >
<p align="center">IP67 / IP68</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;">
<p>ISO Rating</p>
</td>
<td colspan="2">
<p align="center">–</p>
</td>
<td colspan="2">
<p align="center">30 m water<br />
# 10 min</p>
</td>
<td colspan="7" >
<p align="center">–</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>Insertion loss # 1kHz<sup>c</sup></p>
</td>
<td colspan="3" style="vertical-align: middle;">
<p align="center">< 2.5 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 4 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 1.5 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 1.8 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 1.3 dB</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>Adhesive type</p>
</td>
<td colspan="11" style="vertical-align: middle;">
<p align="center">Acrylic</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>Adhesive temperature resistance</p>
</td>
<td colspan="4" style="vertical-align: middle;">
<p align="center">-40 °C to 100 °C</p>
</td>
<td colspan="4" style="vertical-align: middle;">
<p align="center">-40 °C to 85 °C</p>
</td>
<td colspan="3" style="vertical-align: middle;">
<p align="center">-20 °C to 85 °C</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>Membrane type</p>
</td>
<td colspan="11" style="vertical-align: middle;">
<p align="center">ePTFE</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>Membrane characteristic</p>
</td>
<td colspan="3" style="vertical-align: middle;">
<p align="center">Oleophobic</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">Hydrophobic</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">Oleophobic</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">Hydrophobic</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">Oleophobic</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF; width:16%" >
<p>Membrane color</p>
</td>
<td style="vertical-align: middle; width:16%">
<p align="center">Black</p>
</td>
<td colspan="3" style="vertical-align: middle; width:16%">
<p align="center">Black</p>
</td>
<td colspan="2" style="vertical-align: middle; width:16%">
<p align="center">White</p>
</td>
<td colspan="2" style="vertical-align: middle; width:16%">
<p align="center">Black</p>
</td>
<td colspan="2" style="vertical-align: middle; width:16%">
<p align="center">White</p>
</td>
<td style="vertical-align: middle; width:16%">
<p align="center">Black</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>Support material</p>
</td>
<td colspan="6" style="vertical-align: middle;">
<p align="center">PET-Nonwoven / PET</p>
</td>
<td colspan="5" style="vertical-align: middle;">
<p align="center">PET</p>
</td>
</tr>
<tr>
<td bgcolor="#5e86a0" style="color:#FFFFFF;" >
<p>RoHS <sup>d</sup></p>
</td>
<td colspan="11" >
<p align="center">Meets threshold requirements</p>
</td>
</tr>
</tbody>
</table>
The goal is to get the GAW 325, GAW 331, GAW 333, GAW 334, GAW 337, and GAW 338 to be equal widths.
Add the following to <table style="...">:
table-layout:fixed; width:100vw
To each <td style="...">GAW*</td> add:
width: 14vw;
and colspan="2"
Add an extra colspan to each row.
Optional: Changed key <td> into <th>.
A <table> with table-layout: fixed style allows us to assign a width to each column. This is done be assigning width to the top most applicable <td>/<th>, if it's not exactly the top most cell the <td>/<th> with the largest width in the column will determine column width.
Some Advice:
I'm aware that OP cannot use CSS -- this is for future readers
Use classes to declare style not inline-styles.
👍 <th class='header'></th>
👎 <td style='color:#FFFFFF;'></td>
Deprecated attributes: align, cellpadding, cellspacing, border, valign, and bgcolor should not be used -- there are CSS equivalents available.
<table align="left" border="1" cellpadding="0" cellspacing="0" style='table-layout:fixed;width:100vw'>
<tbody>
<tr>
<th bgcolor="#5e86a0" style="width:14vw;color:#FFFFFF; " rowspan="2" valign="bottom">
<p>Property</p>
</th>
<th bgcolor="#5e86a0" style="color:#FFFFFF; " colspan="12">
<p align="center">Material Sets</p>
</th>
</tr>
<tr>
<th style='width:14vw' colspan="2">
<p align="center">GAW<br>325</p>
</th>
<th style="width:14vw" colspan="2">
<p align="center">GAW<br>331<sup>a</sup></p>
</th>
<th style="width:14ww" colspan="2">
<p align="center">GAW<br>333</p>
</th>
<th style="width:14vw" colspan="2">
<p align="center">GAW<br>334<sup>a</sup></p>
</th>
<th style="width:14vw" colspan="2">
<p align="center">GAW<br>337<sup>a</sup></p>
</th>
<th style="width:14vw" colspan="2">
<p align="center">GAW<br>338</p>
</th>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p>IP Rating<sup>b</sup></p>
</th>
<td colspan="12">
<p align="center">IP67 / IP68</p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p>ISO Rating</p>
</th>
<td colspan="2">
<p align="center">–</p>
</td>
<td colspan="2">
<p align="center">30 m water<br /> # 10 min</p>
</td>
<td colspan="8">
<p align="center">–</p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p>Insertion Loss # 1kHz<sup>c</sup></p>
</th>
<td colspan="4" style="vertical-align: middle;">
<p align="center">< 2.5 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 4 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 1.5 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 1.8 dB</p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center">< 1.3 dB</p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p>Adhesive Type</p>
</th>
<td colspan="12" style="vertical-align: middle;">
<p align="center">Acrylic</p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p><small>Adhesive Temp Resistance</small></p>
</th>
<td colspan="4" style="vertical-align: middle;">
<p align="center">-40 °C to 100 °C</p>
</td>
<td colspan="4" style="vertical-align: middle;">
<p align="center">-40 °C to 85 °C</p>
</td>
<td colspan="4" style="vertical-align: middle;">
<p align="center">-20 °C to 85 °C</p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p><small>Membrane Type</small></p>
</th>
<td colspan="12" style="vertical-align: middle;">
<p align="center">ePTFE</p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p><small>Membrane Characteristic</small></p>
</th>
<td colspan="4" style="vertical-align: middle;">
<p align="center"><small>Oleophobic</small></p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center"><small>Hydrophobic</small></p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center"><small>Oleophobic</small></p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center"><small>Hydrophobic</small></p>
</td>
<td colspan="2" style="vertical-align: middle;">
<p align="center"><small>Oleophobic</small></p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF; width:16%">
<p><small>Membrane Color</small></p>
</th>
<td style="vertical-align: middle; width:16%">
<p align="center"><small>Black</small></p>
</td>
<td colspan="4" style="vertical-align: middle; width:16%">
<p align="center">Black</p>
</td>
<td colspan="2" style="vertical-align: middle; width:16%">
<p align="center">White</p>
</td>
<td colspan="2" style="vertical-align: middle; width:16%">
<p align="center">Black</p>
</td>
<td colspan="2" style="vertical-align: middle; width:16%">
<p align="center">White</p>
</td>
<td style="vertical-align: middle; width:16%">
<p align="center"><small>Black</small></p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p>Support Material</p>
</th>
<td colspan="6" style="vertical-align: middle;">
<p align="center">PET-Nonwoven / PET</p>
</td>
<td colspan="6" style="vertical-align: middle;">
<p align="center">PET</p>
</td>
</tr>
<tr>
<th bgcolor="#5e86a0" style="color:#FFFFFF;">
<p>RoHS <sup>d</sup></p>
</th>
<td colspan="12">
<p align="center">Meets Threshold Requirements</p>
</td>
</tr>
</tbody>
</table>
Here is a somewhat hacky approach using padding in the cells. It ends up wrapping the text, but you can play around with it and hopefully get a decent result.
<tr>
<td>
<p align="center" style="padding-left: 30px; padding-right: 30px;">GAW 325</p>
</td>
<td style="" colspan="3">
<p align="center" style="padding-left: 30px; padding-right: 30px;">GAW 331<sup>a</sup></p>
</td>
<td style="" colspan="2">
<p align="center" style="padding-left: 5px; padding-right: 5px;">GAW 333</p>
</td>
<td style="" colspan="2">
<p align="center" style="padding-left: 30px; padding-right: 30px;">GAW 334<sup>a</sup></p>
</td>
<td style="" colspan="2">
<p align="center" style="padding-left: 10px; padding-right: 10px;">GAW 337<sup>a</sup></p>
</td>
<td style="">
<p align="center" style="padding-left: 40px; padding-right: 40px;">GAW 338</p>
</td>
</tr>
html tables are always hard to get exactly right it seems. I see what you mean; trying to edit the cell widths directly cause abnormal results.
here is a fiddle with my edit:
https://jsfiddle.net/exv05h7u/4/
Again, not the smoothest or most elegant approach, but hopefully it helps :)

HTMl Table Width issue when added new table below to show effect like freeze pane

I using the code to create header freeze table but the width of both the tables are not matching. Here is the Code
<div id="view_feedback_table">
<table id="crosstable" border =1 cellpadding="6px" style="margin-top: 30px;TEXT-ALIGN: left;float:left;width:1200px;BORDER-COLLAPSE: collapse;">
<thead>
<tr>
<th colspan="9" style="text-align: center;">
<span style="color: #1b4a84;font-size: 14px;font-weight: 900;">Response</span>
</th>
<th style="text-align: right;">
Download
</th>
</tr>
<tr style="color: white; background-color: rgb(31, 73, 125);">
<th style="width: 10%;">Activity Code</th>
<th style="width: 10%;">No of Completed Associates</th>
<th style="width: 10%;">No of Participants Submitted Feedback</th>
<th style="width: 7%;">Instructor</th>
<th style="width: 7%;">Courseware</th>
<th style="width: 7%;">Environment</th>
<th style="width: 8%;">Learner Support</th>
<th style="width: 7%;">Overall</th>
<th style="width: 10%;">Overall Activity Feedback</th>
<th style="width: 8%;">Overall Activity NPS</th>
</tr>
</thead>
</table>
<table id="crosstable" border =1 cellpadding="6px" style="TEXT-ALIGN: left;float:left;width:1200px;BORDER-COLLAPSE: collapse;display: block;max-height: 50px;overflow-y: auto;">
<tbody>
<tr style="color: rgb(31, 73, 125); background-color: white;">
<td style="width: 10%;">
Activity_Code1
</td>
<td style="width: 10%;">No_
<wbr>of_
<wbr>Completed_
<wbr>Associates
</td>
<td style="width: 10%;">No_
<wbr>of_
<wbr>Participants_
<wbr>Submitted_
<wbr>Feedback
</td>
<td style="width: 7%;">Instructor</td>
<td style="width: 7%;">Courseware</td>
<td style="width: 7%;">Environment</td>
<td style="width: 8%;">Learner_
<wbr>Support
</td>
<td style="width: 7%;">Overall</td>
<td style="width: 10%;">Overall_
<wbr>Activity_
<wbr>Feedback
</td>
<td style="width: 8%;">Overall_
<wbr>Activity_
<wbr>NPS
</td>
</tr>
<tr style="color: rgb(31, 73, 125); background-color: rgb(220, 230, 241);">
<td>
Activity_Code2
</td>
<td>No_
<wbr>of_
<wbr>Completed_
<wbr>Associates
</td>
<td>No_
<wbr>of_
<wbr>Participants_
<wbr>Submitted_
<wbr>Feedback
</td>
<td>Instructor</td>
<td>Courseware</td>
<td>Environment</td>
<td>Learner_
<wbr>Support
</td>
<td>Overall</td>
<td>Overall_
<wbr>Activity_
<wbr>Feedback
</td>
<td>Overall_
<wbr>Activity_
<wbr>NPS
</td>
</tr>
<tr style="color: rgb(31, 73, 125); background-color: white;">
<td>
Activity_Code3
</td>
<td>No_
<wbr>of_
<wbr>Completed_
<wbr>Associates
</td>
<td>No_
<wbr>of_
<wbr>Participants_
<wbr>Submitted_
<wbr>Feedback
</td>
<td>Instructor</td>
<td>Courseware</td>
<td>Environment</td>
<td>Learner_
<wbr>Support
</td>
<td>Overall</td>
<td>Overall_
<wbr>Activity_
<wbr>Feedback
</td>
<td>Overall_
<wbr>Activity_
<wbr>NPS
</td>
</tr>
</tbody>
</table>
</div>
Any suggestions to make this correct. I need freeze header effect so can't use the same table to adjust the width.
Thanks it worked but still have some minor alignment issue when the auto scroll comes into the picture. Is there any way to adjust that one too in the code.
<div style="position: fixed;background:#fff;z-index: 999;">
<table id="crosstable" cellpadding="6px" border=1 style="margin-top: 30px;TEXT-ALIGN: left;width:1200px;">
<tbody>
<tr>
<td colspan="9" style="text-align: center;">
<span style="color: #1b4a84;font-size: 14px;font-weight: 900;">L1 Feedback Response</span>
</th>
<td style="text-align: right;">
<a onclick="download excel("default","default","AC")">
<img src="/pentaho-style/1235/images/excel icon.png" title="Download" style="height: 24px;">
</a>
</th>
</tr>
<tr style="color: white;background-color: rgb(31, 73, 125);/* position: fixed; */">
<td style="width: 10%;">Activity Code</th>
<td style="width: 10%;">No of Completed Associates</th>
<td style="width: 10%;">No of Participants Submitted Feedback</th>
<td style="width: 7%;">Instructor</th>
<td style="width: 7%;">Courseware</th>
<td style="width: 7%;">Environment</th>
<td style="width: 8%;">Learner Support</th>
<td style="width: 7%;">Overall</th>
<td style="width: 10%;">Overall Activity Feedback</th>
<td style="width: 8%;">Overall Activity NPS</th>
</tr>
</tbody>
</table>
</div>
<div style="padding-top:125px;">
<table id="crosstable" cellpadding="6px" border=1 style="TEXT-ALIGN: left;max-height: 500px;width:1200px;">
<tbody>
<tr style="color: rgb(31, 73, 125); background-color: white;">
<td style="width: 10%;">
Activity Code2
</td>
<td style="width: 10%;">No_<wbr>of_<wbr>Completed_<wbr>Associates</td>
<td style="width: 10%;">No_<wbr>of_<wbr>Participants_<wbr>Submitted_<wbr>Feedback</td>
<td style="width: 7%;">Instructor</td>
<td style="width: 7%;">Courseware</td>
<td style="width: 7%;">Environment</td>
<td style="width: 8%;">Learner_<wbr>Support</td>
<td style="width: 7%;">Overall</td>
<td style="width: 10%;">Overall_<wbr>Activity_<wbr>Feedback</td>
<td style="width: 8%;">Overall_<wbr>Activity_<wbr>NPS</td>
</tr>
</tbody>
</table>
</div>
<td> content with "underscores" like No_of_Participants_Submitted_Feedback are unbreakable, therefore it would push the width of the columns. So you might want to use space instead of underscores.
If you must have the underscores, add <wbr> after every underscore like this No_<wbr>of_<wbr>Participants_<wbr>Submitted_<wbr>Feedback.
Also note that you missed % in <td style="width: 7;">Environment</td>.
Just by doing this, you would see a huge change in your result, then you can tweak your codes to match perfectly.

Why are table lines not displaying in Edge?

enter image description here
Had to remove all our copy in order to post publicly, sorry if it makes it hard to see. The border for the rightmost column "Pro" shows up in Firefor, Chrome, and Safari but not in Edge or IE. Anybody run into this before?
section class="line">
<div class="box margin-bottom">
<div class="margin-top-25">
<h1></h1>
</div>
<div class="line margin-top-25">
<div class="margin">
<div class="s-12">
<center>
<table class="table2" style="">
<tr>
<td width="40%"> </td>
<td width="15%"> </td>
<td width="15%"><span class="button" style="background-color: #d2d2d2; color:#000000"><strong></strong></span></td>
<td width="15%"> </td>
<td width="15%"> </td>
</tr>
<tr>
<td class="td2"> </td>
<td class="td2">
<a href="basic_gif1.html" class="tooltip button" style="color: white; background-color: #58595B">
<span class="tooltiptext">Click here to learn more about the Basic Package</span>
<strong>Basic</strong>
</a>
</td>
<td class="td2">
<a href="plus_gif1.html" class="tooltip button" style="color: white; background-color: #b8282e">
<span class="tooltiptext">Click here to learn more about the Plus Package</span>
<strong>Plus</strong>
</a>
</td>
<td class="td2">
<a href="pro_gif1.html" class="tooltip button" style="color: white; background-color: #dc8419">
<span class="tooltiptext">Click here to learn more about the Pro Package</span>
<strong>Pro</strong>
</a>
</td>
</tr>
<tr class="tr2">
<td class="td2" style="text-align: left; font-size: 20px;">
<p></p>
</td>
<td class="td2 tdbl" style="color: #58595B; font-size: 24px;"><strong>•</strong></td>
<td class="td2 tdbl" style="color: #b8282e; font-size: 24px;"><strong>•</strong></td>
<td class="td2 tdbl" style="color: #dc8419; font-size: 24px;"><strong>•</strong></td>
</tr>
<tr class="tr2">
<td class="td2" style="text-align: left; font-size: 20px;">
<p></p>
<p></p>
</td>
<td class="td2 tdbl" style="color: #58595B; font-size: 24px;"><img src="img/newjersey.png" /></td>
<td class="td2 tdbl" style="color: #b8282e; font-size: 24px;"><img src="img/newjersey.png" /></td>
<td class="td2 tdbl" style="font-size: 24px;">
<img src="img/newjersey.png" />
<p>+</p>
<p style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif"><strong>WSJ</strong> or <strong>Forbes</strong></p>
</td>
</tr>
<tr class="tr2">
<td class="td2" style="text-align: left; font-size: 20px;">
<p></p>
</td>
<td class="td2 tdbl"> </td>
<td class="td2 tdbl">Choose 1</td>
<td class="td2 tdbl">Choose 2</td>
</tr>
<tr class="tr2">
<td class="td2" style="text-align: left; font-size: 20px;">
<p></p>
</td>
<td class="td2 tdbl" style="color: #58595B;"><strong></strong></td>
<td class="td2 tdbl" style="color: #58595B;"><strong></strong></td>
<td class="td2 tdbl" style="color: #58595B;"><strong></strong></td>
<tr class="tr2">
<td class="td2" style="text-align: left; font-size: 20px;">
<p></p>
</td>
<td class="td2 tdbl" style="color: #58595B; font-size: 24px;"><strong>•</strong></td>
<td class="td2 tdbl" style="color: #b8282e; font-size: 24px;"><strong>•</strong></td>
<td class="td2 tdbl" style="color: #dc8419; font-size: 24px;"><strong>•</strong></td>
</tr>
</tr>
<tr class="tr2">
<td class="td2" style="text-align: left; font-size: 20px;">
<p></p>
</td>
<td class="td2 tdbl" style="color: #58595B;"><strong>$349</strong></td>
<td class="td2 tdbl" style="color: #58595B;"><strong>$549</strong></td>
<td class="td2 tdbl" style="color: #58595B;"><strong>$979</strong></td>
</tr>
<tr>
<td colspan="4" class="td2" style="background-color: #f5f5f5;font-size: 20px;"><strong></strong></td>
</tr>
<tr>
<td colspan="4" class="td2" style="text-align: left; font-size: 20px;"><strong></strong></td>
</tr>
<tr>
<td colspan="4" class="td2" style="text-align: left;font-size: 20px;"><strong></strong></td>
</tr>
</table>
</center>
</div>
</div>
</div>
<div class="line margin-top-25" style="background-color: #b8282e;"> </div>
<div class="margin-top-25">
<h1 id="tools"></h1>
<p></p>
</div>
<div class="line margin-top-25">
<div class="margin">
<div class="s-12">
<div class="tabs">
<div class="tab-item tab-active">
<a class="tab-label active-btn" name="" style=" width: 33.33333333%;"></a>
<div class="tab-content">
<div class="box" style="text-align: left">
<center>
<table class="table2" style="width: 60%;">
<tr class="tr2">
<td class="td2"> </td>
<td class="td2" colspan="6"><strong>Quantity</strong></td>
</tr>
<tr class="tr2">
<td class="td2"><strong>Product</strong></td>
<td class="td2"><strong>100</strong></td>
<td class="td2"><strong>250</strong></td>
<td class="td2"><strong>500</strong></td>
<td class="td2"><strong>1,000</strong></td>
<td class="td2"><strong>2,000</strong></td>
<td class="td2"><strong>3,000</strong></td>
</tr>
<tr class="tr2">
<td class="td2"></td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
</tr>
<tr class="tr2">
<td class="td2">Brochures</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
<td class="td2" style="font-size: 12px;">$</td>
</tr>
<tr class="tr2">
<td class="td2"></td>
<td class="td2" style="font-size: 12px;">$200</td>
<td class="td2" style="font-size: 12px;">$245</td>
<td class="td2" style="font-size: 12px;">$325</td>
<td class="td2" style="font-size: 12px;">$525</td>
<td class="td2" style="font-size: 12px;">$825</td>
<td class="td2" style="font-size: 12px;">$925</td>
</tr>
<tr class="tr2">
<td class="td2" colspan="7" style="font-size: 12px;"></td>
</tr>
</table>
For the life of me I can't see what's off here. Admittedly I'm pretty new to HTML, but through checking W3 and other online resources I haven't been able to nail down what would be causing this to render incorrectly in IE/Edge
You can use CSS
table {border-collapse: collapse;}
.table2 td {border: 1px solid black;}
See codepen: https://codepen.io/anon/pen/VGRgyJ

Delphi-search and retrieval value in text

Im downloading page to memo1.text and in this text i need to extract some value's to variables.
necessary part of downloaded code:
<tr>
<td style="text-align: left;">Nazwa1</td>
<td style="text-align: right;"> 88.</td>
<td style="text-align: center;"> 20%</td>
<td style="text-align: right;">86</td>
<td style="text-align: right;">108 h</td>
<td style="text-align: center;"> 1.00000</td>
<td style="text-align: right;">8974296.0</td>
<td style="text-align: center;"> 1.00</td>
</tr>
<tr>
<td style="text-align: left;">Nazwa2</td>
<td style="text-align: right;"> 282</td>
<td style="text-align: center;">---</td>
<td style="text-align: right;">261</td>
<td style="text-align: right;">1:26 h</td>
<td style="text-align: center;"> 0.00212</td>
<td style="text-align: right;"> 312001.9</td>
<td style="text-align: center; color: #00cc00; "> 1.02</td>
</tr>
<tr>
<td style="text-align: left;">Nazwa3</td>
<td style="text-align: right;"> 2747</td>
<td style="text-align: center;">100%</td>
<td style="text-align: right;">1833</td>
<td style="text-align: right;">0:27 h</td>
<td style="text-align: center;"> 0.02239</td>
<td style="text-align: right;"> 364.4</td>
<td style="text-align: center; color: #00cc00; "> 1.19</td>
</tr>
<tr>
<td style="text-align: left;">Nazwa4</td>
<td style="text-align: right;"> 413.6</td>
<td style="text-align: center;">100%</td>
<td style="text-align: right;">281</td>
<td style="text-align: right;">0:6 h</td>
<td style="text-align: center;"> 0.00358</td>
<td style="text-align: right;"> 32812.1</td>
<td style="text-align: center; color: #cc0000; "> 0.78</td>
</tr>
I must extract variable value "1.19" from "Nazwa3" table,
everything in table are variables, only name "nazwa3" is const.
uses
regexpr;
function searchandextract(InputStr : string) : string;
var
R : TRegExpr;
begin
Result := '';
R := TRegExpr.Create;
try
R.Expression := '<td style="text-align: left;">Nazwa3</td>(.+?)"> ([0-9\.]+)</td>(.+?)</tr>';
if R.Exec(InputStr) then
begin
Result := R.Match[2];
end;
finally
R.Free;
end;
end;
Label1.Caption := searchandextract(Memo1.Text);
But result of this function is empty and i dont have any idea why?
Do NOT use regular expression to parse HTML files, rather take a look at an HTML parser library, in delphi you could use DIHtmlParser or htmlp .