Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange problem with border collase and border left/right
    primarykey
    data
    text
    <p>I have some strange problem with table in Firefox.</p> <p>What I want to create is to create a grid and think border.</p> <p>Here is the mock up (thanks inkscape).</p> <p><a href="http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Mockup.png" rel="nofollow noreferrer">Mockup http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Mockup.png</a></p> <p>Here is my code:</p> <pre><code>&lt;style&gt; <b>.mytable { border-collapse: collapse; }</b> .mytd { width : 1.3em; border : 1px solid black; padding : 0px; margin : 0px; text-align : center; } .mytd-top { border-top: 3px solid black; } .mytd-bottom { border-bottom: 3px solid black; } <b>.mytd-left { border-left: 3px solid black; }</b> <b>.mytd-right { border-right: 3px solid black; }</b> &lt;/style&gt; &lt;table class="mytable"&gt; &lt;tr&gt;&lt;td class="mytd mytd-top mytd-left"&gt;1&lt;/td&gt;&lt;td class="mytd mytd-top" &gt;2&lt;/td&gt;&lt;td class="mytd mytd-top mytd-right"&gt;3&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="mytd mytd-left"&gt;4&lt;/td&gt;&lt;td class="mytd" &gt;5&lt;/td&gt;&lt;td class="mytd mytd-right"&gt;6&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td class="mytd mytd-bottom mytd-left"&gt;7&lt;/td&gt;&lt;td class="mytd mytd-bottom"&gt;8&lt;/td&gt;&lt;td class="mytd mytd-bottom mytd-right"&gt;9&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;</code></pre> <p>The above code should give me what I want but it does not. There seems to be problem with border left and right when <code>border-colllapse</code> is <code>colllapse</code>.</p> <p>The above mode get me:</p> <p><a href="http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img1.png" rel="nofollow noreferrer">Img 1 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img1.png</a></p> <p><b>No outer border!!!</b></p> <hr> <p>Notice there are three lines in bold.</p> <p>The problem seems to be only to <b>left and right and NOT top and bottom</b>.</p> <p>If the three lines are:</p> <pre><code><b>.mytable { border-collapse: collapse; }</b> <b>.mytd-left { }</b> <b>.mytd-right { }</b></code></pre> <p>I get:</p> <p><a href="http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img2.png" rel="nofollow noreferrer">Img 2 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img2.png</a></p> <p>No problem for top and bottom.</p> <hr> <p>If the three lines are:</p> <pre><code><b>.mytable { border-collapse: collapse; }</b> <b>.mytd-left { border-left: 3px solid black; }</b> <b>.mytd-right { }</b></code></pre> <p>I get:</p> <p><a href="http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img3.png" rel="nofollow noreferrer">Img 3 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img3.png</a></p> <p>The problem seems to be isolate left and right.</p> <hr> <p>If the three lines are:</p> <pre><code><b>.mytable { }</b> <b>.mytd-left { border-left: 3px solid black; }</b> <b>.mytd-right { border-right: 3px solid black; }</b></code></pre> <p>I get:</p> <p><a href="http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img4.png" rel="nofollow noreferrer">Img 4 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img4.png</a></p> <p>Without <code>collapse</code> all border shows as expected.</p> <hr> <p>What is going on here?</p> <p>Is there a work around? a replacement for <code>collapse</code>?</p> <p>I only target FF (internal project) so I don't really care if it work in other browser or not.</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload