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?
Try to using tag body to remove all magin and padding like that you want.
Remove padding between cells inside the table. Just use
cellpadding=0
andcellspacing=0
attributes in table tag.Tables are odd elements. Unlike
div
s they have special rules. Addcellspacing
andcellpadding
attributes, set to0
, and it should fix the problem.I find the most perfectly working answer is this
Use a display block
Try this: