html - padding from outside table border line -
quick question. have table, has border. when add padding, adds padding from inside of table. way make add padding outside border?
essentially, table border lines should appear within cell.
regards (whatever displayed as)
im not 100% sure mean may want this.
html:
<table> <tr> <td>cell 1</td> <td>cell 2</td> </tr> </table>
css:
body { padding: 20px; } table { width: 400px; height: 400px; outline:2px solid red; outline-offset: -15px; } td { border:2px solid blue; }
table only:
cell only:
so here setting outline
, can put outline-offset
on it. bring table if use -
value. use border remember doesn't count towards width or height.
note: can use on each cell etc.
Comments
Post a Comment