OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to remove border between DIV table-cells?

  • Thread starter Thread starter rolinger
  • Start date Start date
R

rolinger

Guest
I have the following:


Code:
<div style="display:table;">
  <div style="display:table-row;background:grey;">
    <div style="display:table-cell;">Cell 1</div>
    <div style="display:table-cell;">Cell 2</div>
    <div style="display:table-cell;">Cell 3</div>
    <div style="display:table-cell;">Cell 4</div>
  </div>
</div>

And it is putting a white border between the cells that for the life of me I can't get rid of.

I have tried all of the following at each of the TABLE, ROW and the CELL levels to no avail:

Code:
border:0px;
border-collapse:collapse;
border-spacing: 0px;

when I remove the display:table-cell from the first two DIV cells, the margins of the full row changes dramatically but the white border between all 4 of the cells do not go away, which makes me think the border is coming from the display:table-row. But nothing seems to work.
<p>I have the following:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><div style="display:table;">
<div style="display:table-row;background:grey;">
<div style="display:table-cell;">Cell 1</div>
<div style="display:table-cell;">Cell 2</div>
<div style="display:table-cell;">Cell 3</div>
<div style="display:table-cell;">Cell 4</div>
</div>
</div></code></pre>
</div>
</div>
</p>
<p>And it is putting a white border between the cells that for the life of me I can't get rid of.</p>
<p>I have tried all of the following at each of the TABLE, ROW and the CELL levels to no avail:</p>
<pre><code>border:0px;
border-collapse:collapse;
border-spacing: 0px;
</code></pre>
<p>when I remove the <code>display:table-cell</code> from the first two DIV cells, the margins of the full row changes dramatically but the white border between all 4 of the cells do not go away, which makes me think the border is coming from the <code>display:table-row</code>. But nothing seems to work.</p>
Continue reading...
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top