<table cellspacing="0" cellpadding="0">
And in css:
table {border: none;}
EDIT: As iGEL noted, this solution is officially deprecated (still working), so if you are starting from scratch you should go with jnpcl border-collapse solution.
Actually, I don’t like this change at all (often I don’t work with tables). This complicates some tasks. For example. when you want to include two different borders in the same place (visually), and one is TOP for one line, and the second is BOTTOM for another line. They will crash (= only one of them will be shown). Then you need to learn how the boundary “priority” is calculated and which border styles are “stronger” (double vs. solid, etc.).
I like it:
<table cellspacing="0" cellpadding="0"> <tr> <td class="first">first row</td> </tr> <tr> <td class="second">second row</td> </tr> </table> ---------- .first {border-bottom:1px solid #EEE;} .second {border-top:1px solid #CCC;}
Now, when the border is broken, this will not work, because one border is always deleted. I have to do it in some other way (there are more ofc solutions). One possibility is to use CSS3 with box-shadow:
<table class="tab"> <tr> <td class="first">first row</td> </tr> <tr> <td class="second">second row</td> </tr> </table> <style> .tab {border-collapse:collapse;} .tab .first {border-bottom:1px solid #EEE;} .tab .second {border-top:1px solid #CCC;box-shadow: inset 0 1px 0 #CCC;} </style>
You can also use something like the groove | ridge | inset | outset style with one border. But for me this is not optimal, because I can not control both colors.
Maybe there is a simple and pleasant solution for dropping boundaries, but I have not seen it yet, and I honestly have not spent much time on this. Maybe someone here can show me / us;)
Damb Apr 16 2018-11-11T00: 00Z
source share