如何去除自定义表格内的单元格边框?

问题描述 投票:0回答:1

如何从表格中隐藏这条窄边框线?

一条窄线将作为每个 > 列的边框。已应用

border: none;
border-collapse
属性。----

请查看下面的代码,并给我一个解决方案来隐藏表格内看起来像边框的窄线

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #FFFFFF;
}

  
.green-container {
  border: 2px solid #87976e;
  border-radius: 5px;
  width: 80%;
  margin: auto;
}


.title-head {
  color: #84161D;
  font-family: Helvetica Now Display;
  font-size: 21.56px;
  /* Increased by 1.75 */
  font-weight: 700;
  line-height: 31.45px;
  /* Increased by 1.75 */
  text-align: left;
}

.container {
  font-family: "Helvetica Now Display", "serif";
  height: 1472px;
  width: 1041.25px;
  margin: auto;
  background-color: #F5F5F5;
  page-break-after: always;
}

.desc-img-div {
  width: 50.4px;
  height: 49.315px;
  top: 0.55px;
  gap: 0px;
  opacity: 0px;
  background: #FFF4F4;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
}

.desc-img {
  width: 29.645px;
  height: 35px;
  opacity: 0px;
}

   
.wrapper {
  width: 94%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.insights .container {
  font-family: "Helvetica Now Display", "serif";
  height: 1470px;
  width: 1041.25px;
  margin: auto;
  background-color: #f5f5f5;
}

.insights .header-container {
  background: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.insights .logo-img {
  padding-left: 0px;
  width: 100%;
  height: 100%;
}

.insights .desc-div {
  display: flex;
  width: 250.51px;
  height: 29.29px;
  gap: 6px;
  opacity: 0px;
}

.insights .desc-img-div {
  width: 50.8px;
  height: 49.18px;
  top: 0.55px;
  gap: 0px;
  opacity: 0px;
  background: #FFF4F4;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
}

.insights .title-img {
  width: 42.94px;
  height: 44px;
  opacity: 0px;
}

.insights .desc-img {
  width: 29.94px;
  height: 35px;
  opacity: 0px;
}

.insights .desc-p1 {
  font-family: Helvetica Now Display;
  font-size: 15.39px;
  font-weight: 700;
  line-height: 33.34px;
  text-align: left;
  margin: 0;
  margin-bottom: -9px;
  color: #555555;
}

.insights .desc-p2 {
  font-family: Helvetica Now Display;
  font-size: 15.39px;
  font-weight: 300;
  line-height: 33.34px;
  text-align: left;
  margin: 0;
  color: #555555;
}

.insights .title {
  margin: 35px 30px;
  font-size: 24.54px;
  font-weight: 700;
  color: #44546A;
  margin-bottom: 10px;
  font-family: "Helvetica Now Display";
  list-style: 18.13px
}

.insights .card {
  border-radius: 10.36px;
  background-color: #ffffff;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
  padding-bottom: 2px;
  margin: 0px 30px;
}

.insights .cover {
  background-color: #fff;
  width: 100%;
}

.insights .cover .dashboard-insigts {
  width: 100%;
  background-color: #f5f5f5;
  height: calc(100vh - 90px);
  overflow-y: scroll;
  border-top-left-radius: 1rem;
}

.insights .cover .dashboard-insigts .tabs {
  max-width: 100%;
  width: 94%;
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 0.3rem;
  margin-left: 3%;
  margin-top: 2rem;
}

.insights .cover .dashboard-insigts .tabs .tab {
  background-color: #fff;
  border-radius: 10px;
  cursor: pointer;
  flex-grow: 0;
  flex-wrap: nowrap;
}

.insights .cover .dashboard-insigts .tabs .tab div {
  color: #5f5f5f;
  font-size: 17px;
  margin: 8px 10px;
  font-weight: 300;
  font-family: "Helvetica Now Display";
}

.insights .cover .dashboard-insigts .tabs .active0 {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.insights .cover .dashboard-insigts .tabs .active0 div {
  color: #97a97c;
  font-weight: 700;
  border-bottom: 1px solid #97a97c;
  margin-bottom: 20px;
}

.insights .cover .dashboard-insigts .tabs .active1 {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.insights .cover .dashboard-insigts .tabs .active1 div {
  color: #84161d;
  font-weight: 700;
  border-bottom: 1px solid #84161d;
  margin-bottom: 20px;
}

.insights .cover .dashboard-insigts .tabs .active2 {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.insights .cover .dashboard-insigts .tabs .active2 div {
  color: #44546a;
  font-weight: 700;
  border-bottom: 1px solid #44546a;
  margin-bottom: 20px;
}

.insights .cover .dashboard-insigts .box {
  max-width: 100%;
  width: 94%;
  margin: auto;
  border-radius: 15px;
  background-color: #fff;
  padding-bottom: 1rem;
}

.insights .cover .dashboard-insigts .box .leppa-container .lpp {
  font-weight: 300;
  align-self: flex-start;
  margin-left: 2%;
  font-size: 18px;
  font-family: "Helvetica Now Display";
  color: #3b3939;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container {
  display: flex;
  gap: 2rem;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container .lp-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container .lp-container div {
  font-family: "Helvetica Now Display";
  font-size: 21px;
  font-weight: 300;
  color: #3b3939;
  display: inline-flex;
  margin: 0;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container .lp-container img {
  object-fit: contain;
  width: 33px;
  margin-right: 0.4rem;
}

.insights .matrix {
  font-family: "Helvetica Now Display";
  width: 954.02px;
  margin: auto;
  margin-bottom: 1rem;
  border-radius: 12px;
  padding: 0;
  border-collapse: collapse;
}

.insights .matrix .head .row {
  display: flex;
}

.insights .matrix .head .row {
  display: flex;
}

.insights .matrix .head .h-cell {
  font-size: 16.88px;
  line-height: 18.36px;
  color: #fff;
  text-align: start;
  font-weight: 700;
  padding: 16px 4px 16px 8px;
  margin: 0;
  display: flex;
  align-items: center;
  font-family: "Helvetica Now Display";
}

.insights .matrix .head .alignment-text {
  font-size: 15.32px;
  font-weight: 300;
  text-wrap: nowrap;
  margin: 0;
}

.insights .matrix .head .thead-img {
  background-color: #fff;
  border-radius: 100%;
  padding: 4px;
  object-fit: contain;
  height: 25.43px;
  margin-right: 0.7rem;
}

.insights .matrix .head .collapse-img {
  object-fit: contain;
  height: 18px;
  text-align: center;
  cursor: pointer;
}

.insights .matrix .head .h-cell:first-child {
  border-top-left-radius: 10px;
}

.insights .matrix .head .h-cell:last-child {
  border-top-right-radius: 10px;
}

.insights .matrix .head .superscript {
  display: none;
  font-family: "Helvetica Now Display";
  font-size: 19px;
  font-weight: 700;
  vertical-align: top;
  position: relative;
  top: -3px;
  left: 1px;
}

.insights .matrix .body .row {
  display: flex;
  min-height: 45px;
}

.insights .matrix .body .b-cell {
  display: flex;
  align-items: center;
  color: #343333;
  font-size: 15.32px;
  line-height: 20.33px;
  font-weight: 300;
  text-align: start;
  padding: 4px 8px 4px 8px;
  font-family: "Helvetica Now Display";
}

.insights .matrix .body .b-cell:not(:first-child) {
  justify-content: center;
}

.insights .matrix .body .row:nth-child(odd) {
  background-color: #f0f0f0;
}

.insights .matrix .body .row:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.insights .collapsed .head .h-cell:first-child {
  border-bottom-left-radius: 10px;
}

.insights .collapsed .head .h-cell:last-child {
  border-bottom-right-radius: 10px;
}

.insights .green {
  border: 2px solid #97a97c;
}

.insights .green .head .h-cell {
  background-color: #97a97c;
}

.insights .green .head .h-cell:nth-child(2) {
  border-left: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green .head .h-cell:nth-child(3) {
  border-left: 2px solid #d0dcbf;
  border-right: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green .body .b-cell:nth-child(2) {
  border-left: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green .body .b-cell:nth-child(3) {
  border-left: 2px solid #d0dcbf;
  border-right: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green1 {
  border: 1.03px solid #44546A;
}

.insights .green1 .head .h-cell {
  background-color: #44546A;
}

.insights .green1 .body .b-cell:nth-child(2) {
  border-left: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green1 .body .b-cell:nth-child(3) {
  border-left: 2px solid #d0dcbf;
  border-right: 2px solid #d0dcbf;
  text-align: center;
}

.insights .discover-container {
  margin: 2rem auto;
  padding: 18px;
  font-family: Helvetica Now Display;
  font-size: 21px;
  line-height: 32px;
  color: #343333;
  background-color: #fff;
  text-align: center;
  width: 94%;
  box-sizing: border-box;
  border-radius: 20px;
  height: 270px;
}

.insights .lp-container img {
  object-fit: contain;
  width: 32px;
  height: 28px;
  margin-right: 0.4rem;
  margin-bottom: -8px;
}

.insights2 .green1 {
  border: 1.03px solid #84161D;
}

.insights2 .title {
  color: #84161D;
}

.insights3 .green1 {
  border: 1.03px solid #97A97C;
}

.insights3 .title {
  color: #97A97C;
}
<link href="https://db.onlinewebfonts.com/c/0976a2619014c5855690b7509fab4c6e?family=Helvetica+Now+Display" rel="stylesheet">
<div class="page-10-areas-needing-alignment insights container">
  <div class="card">
    <div class="box matrix" style="border-top-left-radius: 0px;">
      <div class="leppa-container" style="">
        <div class="head">
          <div class="row">
            <div class="h-cell" style="width: 532.03px;">
              <div class="h-cell" style="width: 2%;"></div>
            </div>
          </div>
          <div class="matrix green1">
            <div class="head">
              <div class="row insights" style="height: 52.53px">
                <div class="h-cell" style="width: 547px;"><img class="thead-img" src="">
                  <div>Resources </div> <span style="margin-bottom: 12px;" ;> </span>
                </div>
                <div class="h-cell" style="width: 205px;"></div>
                <div class="h-cell" style="width: 215px; padding: 2px;">
                  <div class="alignment-text">dummy data dummy data</div>
                </div>
                <div class="h-cell collapse" style="width: 45px;"><img class="collapse-img">
                </div>

              </div>
            </div>
            
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

html css
1个回答
0
投票

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #FFFFFF;
}

  
.green-container {
  border: 2px solid #87976e;
  border-radius: 5px;
  width: 80%;
  margin: auto;
}


.title-head {
  color: #84161D;
  font-family: Helvetica Now Display;
  font-size: 21.56px;
  /* Increased by 1.75 */
  font-weight: 700;
  line-height: 31.45px;
  /* Increased by 1.75 */
  text-align: left;
}

.container {
  font-family: "Helvetica Now Display", "serif";
  height: 1472px;
  width: 1041.25px;
  margin: auto;
  background-color: #F5F5F5;
  page-break-after: always;
}

.desc-img-div {
  width: 50.4px;
  height: 49.315px;
  top: 0.55px;
  gap: 0px;
  opacity: 0px;
  background: #FFF4F4;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
}

.desc-img {
  width: 29.645px;
  height: 35px;
  opacity: 0px;
}

   
.wrapper {
  width: 94%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.insights .container {
  font-family: "Helvetica Now Display", "serif";
  height: 1470px;
  width: 1041.25px;
  margin: auto;
  background-color: #f5f5f5;
}

.insights .header-container {
  background: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
}

.insights .logo-img {
  padding-left: 0px;
  width: 100%;
  height: 100%;
}

.insights .desc-div {
  display: flex;
  width: 250.51px;
  height: 29.29px;
  gap: 6px;
  opacity: 0px;
}

.insights .desc-img-div {
  width: 50.8px;
  height: 49.18px;
  top: 0.55px;
  gap: 0px;
  opacity: 0px;
  background: #FFF4F4;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50px;
}

.insights .title-img {
  width: 42.94px;
  height: 44px;
  opacity: 0px;
}

.insights .desc-img {
  width: 29.94px;
  height: 35px;
  opacity: 0px;
}

.insights .desc-p1 {
  font-family: Helvetica Now Display;
  font-size: 15.39px;
  font-weight: 700;
  line-height: 33.34px;
  text-align: left;
  margin: 0;
  margin-bottom: -9px;
  color: #555555;
}

.insights .desc-p2 {
  font-family: Helvetica Now Display;
  font-size: 15.39px;
  font-weight: 300;
  line-height: 33.34px;
  text-align: left;
  margin: 0;
  color: #555555;
}

.insights .title {
  margin: 35px 30px;
  font-size: 24.54px;
  font-weight: 700;
  color: #44546A;
  margin-bottom: 10px;
  font-family: "Helvetica Now Display";
  list-style: 18.13px
}

.insights .card {
  border-radius: 10.36px;
  background-color: #ffffff;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
  padding-bottom: 2px;
  margin: 0px 30px;
}

.insights .cover {
  background-color: #fff;
  width: 100%;
}

.insights .cover .dashboard-insigts {
  width: 100%;
  background-color: #f5f5f5;
  height: calc(100vh - 90px);
  overflow-y: scroll;
  border-top-left-radius: 1rem;
}

.insights .cover .dashboard-insigts .tabs {
  max-width: 100%;
  width: 94%;
  display: flex;
  flex-direction: row;
  align-items: start;
  gap: 0.3rem;
  margin-left: 3%;
  margin-top: 2rem;
}

.insights .cover .dashboard-insigts .tabs .tab {
  background-color: #fff;
  border-radius: 10px;
  cursor: pointer;
  flex-grow: 0;
  flex-wrap: nowrap;
}

.insights .cover .dashboard-insigts .tabs .tab div {
  color: #5f5f5f;
  font-size: 17px;
  margin: 8px 10px;
  font-weight: 300;
  font-family: "Helvetica Now Display";
}

.insights .cover .dashboard-insigts .tabs .active0 {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.insights .cover .dashboard-insigts .tabs .active0 div {
  color: #97a97c;
  font-weight: 700;
  border-bottom: 1px solid #97a97c;
  margin-bottom: 20px;
}

.insights .cover .dashboard-insigts .tabs .active1 {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.insights .cover .dashboard-insigts .tabs .active1 div {
  color: #84161d;
  font-weight: 700;
  border-bottom: 1px solid #84161d;
  margin-bottom: 20px;
}

.insights .cover .dashboard-insigts .tabs .active2 {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.insights .cover .dashboard-insigts .tabs .active2 div {
  color: #44546a;
  font-weight: 700;
  border-bottom: 1px solid #44546a;
  margin-bottom: 20px;
}

.insights .cover .dashboard-insigts .box {
  max-width: 100%;
  width: 94%;
  margin: auto;
  border-radius: 15px;
  background-color: #fff;
  padding-bottom: 1rem;
}

.insights .cover .dashboard-insigts .box .leppa-container .lpp {
  font-weight: 300;
  align-self: flex-start;
  margin-left: 2%;
  font-size: 18px;
  font-family: "Helvetica Now Display";
  color: #3b3939;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container {
  display: flex;
  gap: 2rem;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container .lp-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container .lp-container div {
  font-family: "Helvetica Now Display";
  font-size: 21px;
  font-weight: 300;
  color: #3b3939;
  display: inline-flex;
  margin: 0;
}

.insights .cover .dashboard-insigts .box .leppa-container .lepa-container .lp-container img {
  object-fit: contain;
  width: 33px;
  margin-right: 0.4rem;
}

.insights .matrix {
  font-family: "Helvetica Now Display";
  width: 954.02px;
  margin: auto;
  margin-bottom: 1rem;
  border-radius: 12px;
  padding: 0;
  border-collapse: collapse;
}

.insights .matrix .head .row {
  display: flex;
}

.insights .matrix .head .row {
  display: flex;
}

.insights .matrix .head .h-cell {
  font-size: 16.88px;
  line-height: 18.36px;
  color: #fff;
  text-align: start;
  font-weight: 700;
  padding: 16px 4px 16px 8px;
  margin: 0;
  display: flex;
  align-items: center;
  font-family: "Helvetica Now Display";
}

.insights .matrix .head .alignment-text {
  font-size: 15.32px;
  font-weight: 300;
  text-wrap: nowrap;
  margin: 0;
}

.insights .matrix .head .thead-img {
  background-color: #fff;
  border-radius: 100%;
  padding: 4px;
  object-fit: contain;
  height: 25.43px;
  margin-right: 0.7rem;
}

.insights .matrix .head .collapse-img {
  object-fit: contain;
  height: 18px;
  text-align: center;
  cursor: pointer;
}

.insights .matrix .head .h-cell:first-child {
  border-top-left-radius: 10px;
}

.insights .matrix .head .h-cell:last-child {
  border-top-right-radius: 10px;
}

.insights .matrix .head .superscript {
  display: none;
  font-family: "Helvetica Now Display";
  font-size: 19px;
  font-weight: 700;
  vertical-align: top;
  position: relative;
  top: -3px;
  left: 1px;
}

.insights .matrix .body .row {
  display: flex;
  min-height: 45px;
}

.insights .matrix .body .b-cell {
  display: flex;
  align-items: center;
  color: #343333;
  font-size: 15.32px;
  line-height: 20.33px;
  font-weight: 300;
  text-align: start;
  padding: 4px 8px 4px 8px;
  font-family: "Helvetica Now Display";
}

.insights .matrix .body .b-cell:not(:first-child) {
  justify-content: center;
}

.insights .matrix .body .row:nth-child(odd) {
  background-color: #f0f0f0;
}

.insights .matrix .body .row:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.insights .collapsed .head .h-cell:first-child {
  border-bottom-left-radius: 10px;
}

.insights .collapsed .head .h-cell:last-child {
  border-bottom-right-radius: 10px;
}

.insights .green {
  border: 2px solid #97a97c;
}

.insights .green .head .h-cell {
  background-color: #97a97c;
}

.insights .green .head .h-cell:nth-child(2) {
  border-left: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green .head .h-cell:nth-child(3) {
  border-left: 2px solid #d0dcbf;
  border-right: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green .body .b-cell:nth-child(2) {
  border-left: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green .body .b-cell:nth-child(3) {
  border-left: 2px solid #d0dcbf;
  border-right: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green1 {
  border: 1.03px solid #44546A;
}

.insights .green1 .head .h-cell {
  background-color: #44546A;
}

.insights .green1 .body .b-cell:nth-child(2) {
  border-left: 2px solid #d0dcbf;
  text-align: center;
}

.insights .green1 .body .b-cell:nth-child(3) {
  border-left: 2px solid #d0dcbf;
  border-right: 2px solid #d0dcbf;
  text-align: center;
}

.insights .discover-container {
  margin: 2rem auto;
  padding: 18px;
  font-family: Helvetica Now Display;
  font-size: 21px;
  line-height: 32px;
  color: #343333;
  background-color: #fff;
  text-align: center;
  width: 94%;
  box-sizing: border-box;
  border-radius: 20px;
  height: 270px;
}

.insights .lp-container img {
  object-fit: contain;
  width: 32px;
  height: 28px;
  margin-right: 0.4rem;
  margin-bottom: -8px;
}

.insights2 .green1 {
  border: 1.03px solid #84161D;
}

.insights2 .title {
  color: #84161D;
}

.insights3 .green1 {
  border: 1.03px solid #97A97C;
}

.insights3 .title {
  color: #97A97C;
}
 <link href="https://db.onlinewebfonts.com/c/0976a2619014c5855690b7509fab4c6e?family=Helvetica+Now+Display" rel="stylesheet">
    <div class="page-10-areas-needing-alignment insights container">
      <div class="card">
        <div class="box matrix" style="border-top-left-radius: 0px;">
          <div class="leppa-container" style="">
            <div class="head">
              <div class="row">
                <div class="h-cell" style="width: 532.03px;">
                  <div class="h-cell" style="width: 2%;"></div>
                </div>
              </div>
              <div class="matrix green1" style="background: #44546A;">
                <div class="head">
                  <div class="row insights" style="height: 52.53px">
                    <div class="h-cell" style="width: 547px;"><img class="thead-img" src="">
                      <div>Resources </div> <span style="margin-bottom: 12px;" ;> </span>
                    </div>
                    <div class="h-cell" style="width: 205px;"></div>
                    <div class="h-cell" style="width: 215px; padding: 2px;">
                      <div class="alignment-text">dummy data dummy data</div>
                    </div>
                    <div class="h-cell collapse" style="width: 45px;"><img class="collapse-img">
                    </div>
    
                  </div>
                </div>
                
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

在头部父级中添加背景颜色。

© www.soinside.com 2019 - 2024. All rights reserved.