What is the most effective method for creating a table with a 1px grid (internal and external)? Could it be possible that Chrome and Edge have issues with borders in certain scenarios?
On this Codeply example, the standard approach is taken - setting border-right
and border-bottom
on the table
, and border-top
and border-left
on td,th
. However, this method doesn't yield consistent results. It appears fine on Android and Firefox (HD/1080 on Windows, UHD/4K on Linux), but has flaws on Edge and Chrome (on both Windows and Linux) where some internal and external borders appear as 2px thick.
I must admit that I am not alone in facing this challenge. There are numerous similar queries online, yet achieving browser consistency seems to be a struggle. Take this SO answer, for instance, which includes a jsFiddle demonstrating varying visuals on Firefox (108.0.2) and Chrome (108.0.5359.125). In the Chrome version, the top and bottom vertical lines appear double-width, while the middle line is single-width. The presentation in Firefox is more desirable in comparison.