Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 滚动条覆盖右单元格中的文本_Html - Fatal编程技术网

Html 滚动条覆盖右单元格中的文本

Html 滚动条覆盖右单元格中的文本,html,Html,我真的被困在这个问题上了 我的表格有三个单元格(没有标题)-当我向表格中添加滚动条时,表格保持其宽度,因此滚动条实际上占据右侧单元格的一部分并覆盖边框。我不在乎表格是大一点还是小一点,但我希望表格的全部内容都有3个相等的单元格和边框。滚动条应该附加到表上,而不是隐藏内容 我到处找遍了,什么都试过了 这是我的密码 第1a单元。。。。。。。。。。。。。。。 我现在尝试在中使用该示例,但遇到了相同的问题请检查此项。这是你想要的吗 你的css看起来像这样 #table-wrapper { po

我真的被困在这个问题上了

我的表格有三个单元格(没有标题)-当我向表格中添加滚动条时,表格保持其宽度,因此滚动条实际上占据右侧单元格的一部分并覆盖边框。我不在乎表格是大一点还是小一点,但我希望表格的全部内容都有3个相等的单元格和边框。滚动条应该附加到表上,而不是隐藏内容

我到处找遍了,什么都试过了

这是我的密码


第1a单元。。。。。。。。。。。。。。。
我现在尝试在中使用该示例,但遇到了相同的问题

请检查此项。这是你想要的吗

你的css看起来像这样

#table-wrapper {
  position:relative;
    overflow:auto;
}
#table-scroll {
  height:100px;   
}
#table-wrapper table {
  width:100%;
}
#table-wrapper table * {
  background:yellow;
  color:black;
}
#table-wrapper table thead th .text {
  position:absolute;   
  z-index:2;
  height:20px;
  width:33%;
  border:1px solid red;
}

提琴对我不好,因为我想要不同的背景颜色(棋盘格)的细胞-一定有办法做到这一点,但我找不到它

这就是我最终的工作

<div style="padding: 1px; height: 500px;width: 775px;  overflow: auto;">
<table class="aligncenter" width = "755" style="border-width: 1px; border-color: #6b1ae4; background-color: #cfdfee;" border="1" cellspacing="1" cellpadding="1" align="center">


宽度上的差异没有关系

NEVERMIND-我找到了解决办法
<div style="padding: 1px; height: 500px;width: 775px;  overflow: auto;">
<table class="aligncenter" width = "755" style="border-width: 1px; border-color: #6b1ae4; background-color: #cfdfee;" border="1" cellspacing="1" cellpadding="1" align="center">