I have this table :
<body> <table id="page" > <tr id="header" > <td colspan="2" id="tdheader" >je suis</td> </tr> <tr> <td>1</td> <td>2</td> </tr> </table> </body>
and here is the css
html, body, #page { height:100%; width:100%; margin:0; padding:0; } #header { margin:0; padding:0; height:20px; background-color:green; }
and I want to remove all margin and padding but always I have that :
How can I resolve this?
You can remove this margin by setting the top and left margin to zero. Like the padding and border, the sizes of specific sides of the margin can be set using margin-left , margin-right , margin-top , and margin-bottom . The browser should now display a blue box that is 100 pixels wide and 1000 pixels high.
In traditional HTML coding you remove the spacing within a cell by setting the “cellspacing” attribute to zero.
Try to use this CSS:
/* Apply this to your `table` element. */ #page { border-collapse: collapse; } /* And this to your table's `td` elements. */ #page td { padding: 0; margin: 0; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With