concept

Border conflict resolution — CSS reference

In collapsed mode hidden suppresses a contested border; none has the lowest priority. Otherwise wider borders win, then border styles and originating boxes resolve ties. This example checks a width conflict; it does not assume computed border width equals the painted winner.

Formal Syntax & Structure

css syntaxcss
td.left { border-right: 4px solid red; } td.right { border-left: 8px solid blue; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Border conflict resolution</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}body{font:16px/20px sans-serif;background:white}#a{padding:0;background:transparent;margin:10px;color:black}table{border-spacing:0}td,th{padding:0}caption{padding:0}#a{border-collapse:collapse}td{width:60px;height:30px;border:4px solid red}#y{border-left:8px solid blue}</style><body><table id="a"><tr><td id="x">A</td><td id="y">B</td></tr><tr><td id="z">C</td><td>D</td></tr></table></body></html>
CSS Reference