为什么在使用WAMP的网站上没有在Firefox上使用div表?

时间:2022-10-16 00:28:19

I can get regular table tags working fine, but I need them to be divs in order to easily let users adjust the size. I used the [converter tool here][1] to generate my div-table code. The demo on that site is working fine as is every other div-table I've seen on the internet. When I inspect the element of the div-table, there's nothing in the styling box. My borders are not showing up either. The rows all seem to be in the right position, but the cells within each row are arranged vertically instead of horizontally.

我可以让常规表标签工作正常,但我需要它们是div,以便轻松让用户调整大小。我使用[转换器工具] [1]来生成我的div表代码。该网站上的演示正如我在互联网上看到的其他每个div表一样正常。当我检查div-table的元素时,样式框中没有任何内容。我的边界也没出现。行似乎都在正确的位置,但每行中的单元格是垂直排列而不是水平排列。

I suppose the problem is my WAMP 64bit 3.0.6 server. I'm running Apache 2.4.23, along with PHP 5.6.25. Please let me know what other information you need to diagnose my problem. I tried restarting the server as well as my computer, but to no effect.

我想问题是我的WAMP 64位3.0.6服务器。我正在运行Apache 2.4.23以及PHP 5.6.25。请告诉我您诊断问题所需的其他信息。我尝试重新启动服务器以及我的计算机,但没有效果。

Even though the regular table tags work fine, the site I'm making has a tabular layout, so I figured I'm supposed to use div-tables.

即使常规表标签工作正常,我正在制作的网站有一个表格布局,所以我想我应该使用div表。

Here is a snippet with the exact same code that doesn't work on my home WAMP server:

这是一个完全相同的代码片段,在我的家庭WAMP服务器上不起作用:

body {
  margin: 40px;
  min-width: 100%;
  min-height: 100%;
  height: 100%;
  width: 100%;
}

html {
  min-width: 100%;
  min-height: 100%;
  height: 100%;
  width: 100%;
}


/* DivTable.com */

.divTable {
  display: table;
  width: 100%;
}

.divTableRow {
  display: table-row;
}

.divTableHeading {
  background-color: #EEE;
  display: table-header-group;
}

.divTableCell,
.divTableHead {
  border: 1px solid #999999;
  display: table-cell;
  padding: 3px 10px;
}

.divTableHeading {
  background-color: #EEE;
  display: table-header-group;
  font-weight: bold;
}

.divTableFoot {
  background-color: #EEE;
  display: table-footer-group;
  font-weight: bold;
}

.divTableBody {
  display: table-row-group;
}
<!DOCTYPE HTML>
<html>

<head>
  <meta charset="UTF-8">
  <title>Link Aggregator Grid</title>
  <link rel="stylesheet" type="text/css" href="css/memewar.css" />
</head>

<body>
  <div class="divTable">
    <div class="divTableBody">
      <div class="divTableRow">
        <div class="divTableCell">test</div>
        <div class="divTableCell">test;</div>
        <div class="divTableCell">test</div>
      </div>
      <div class="divTableRow">
        <div class="divTableCell">test</div>
        <div class="divTableCell">test;</div>
        <div class="divTableCell">test</div>
      </div>
      <div class="divTableRow">
        <div class="divTableCell">test</div>
        <div class="divTableCell">test;</div>
        <div class="divTableCell">test</div>
      </div>
    </div>
  </div>
</body>

</html>

1 个解决方案

#1


0  

Mr Lister was correct. It was an encoding mismatch issue. I feel like it hasn't been an issue in the past, but I can't argue with the results...

利斯特先生是对的。这是编码不匹配的问题。我觉得这在过去并不是一个问题,但我无法与结果争论......

#1


0  

Mr Lister was correct. It was an encoding mismatch issue. I feel like it hasn't been an issue in the past, but I can't argue with the results...

利斯特先生是对的。这是编码不匹配的问题。我觉得这在过去并不是一个问题,但我无法与结果争论......