[英]Two or more tables side by side
I would like to add at least another table next to the one in this code, any help appreciated? 我想在此代码中的表旁边至少添加一个表,对您有所帮助吗?
> <div id="view0"></div>
<script>
$(function(){
$('#view0').csv2table('./CSVFiles/CallsClosedbyDept.csv');
});
</script>
The code loads a csv and displays it as table and I would like to add another CSV file as a table but instead of below the first table I would like them to be side by side. 该代码加载一个csv并将其显示为表格,我想将另一个CSV文件添加为表格,但是我希望它们并排放置,而不是在第一个表格下方。 the full code is below.
完整代码如下。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><style>
div.csv2table-div {
padding : 5px;
margin : 1px;
}
table.csv2table-table {
border-collapse : collapse;
border-spacing : 0px;
margin-bottom : 10px;
}
th.csv2table-table-th{
border-color : #eee #999 #777 #bbb;
border-style : solid;
border-width : 1px;
background-color : red;
padding : 8px;
font-size : 16px;
color : white;
text-align : center;
}
td.csv2table-table-td{
border-color : #eee #999 #777 #bbb;
border-style : solid;
border-width : 1px;
padding : 8px;
font-size : 14px;
text-align : center;
}
td.csv2table-table-td:nth-child(1){
background-color : blue;
color : white;
}
th.csv2table-sortMark{
}
td.csv2table-hoboNum{
}
</style><title>Calls Closed by Department or Depot</title></head>
<body>
<div style="text-align: left;"><div style="text-align: left;"><img style="width: 130px; height: 76px;" alt="" src="file://///vm-spiceworks/e$/Program%20Files%20%28x86%29/Spiceworks/pkg/gems/spiceworks_public-7.1.00024/photos/Hire%20Solutions-01.jpg"><br></div><big style="font-weight: bold;"><big><big><br><span style="color: rgb(51, 0, 153);">Calls Closed by Department or Depot May 2014</span><br><br></big></big></big>
</div>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/jquery.csv2table-0.02-b-4.7.js"></script>
<script>
$.csv2table.cssReset();
</script>
<div id="view0"></div>
<script>
$(function(){
$('#view0').csv2table('./CSVFiles/CallsClosedbyDept.csv');
});
</script>
<br>
<span style="font-weight: bold; color: rgb(51, 0, 153);">Confidential and `Proprietary</span></body></html>`
use this structure 使用这种结构
<div style="border:1px #ccc solid">
<div style="width:45%; float:left; min-height:300px;">
1st table code here
</div>
<div style="width:45%; float: right; min-height:300px;">
2nd table code here
</div>
<div style="clear:both"></div>
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.