Okay, first off, I honestly think this warrents a table.
CSS:
table{
align: center;
border-width: 1px;
border-style: solid;
border-color: #00ffff;
padding: 0;
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:0;
}
td{
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:0;
border-width: 1px;
border-style: solid;
border-color: #00ffff;
padding:5px;
}
HTML:
<table>
<tr>
<td>MSN</td>
<td>[email protected]</td>
</tr>
<tr>
<td>AIM</td>
<td>Mr Initial Man</td>
</tr>
<tr>
<td>YIM</td>
<td>mrinitialman</td>
</tr>
<tr>
<td>ICQ</td>
<td>147433425 <strong>(I'm rarely on this one)</strong></td>
</tr>
<tr>
<td>E-mail</td>
<td>[email protected]<br>
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --></td>
</tr>
</table>
What I am trying to do is close up the space between the cells so their borders are touching.
I also want to center the table. How do I do this?Start by putting this stuff together:
border-width: 1px;
border-style: solid;
border-color: #00ffff;
like this : border:1px solid #00ffff;
then replace this :
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:0;
with this :
margin: 0 auto; (this should centre your table)
and change this :
padding:5px;
to this:
padding:0px; (this might fix your problem).Put a border-collapse:collapse; in your table style.Well, everything worked except your last bit of advice: the <td> padding only controls how close the border is to the text, not how close the cells are to each other. Nor does the centering work in IE.Thanks, Ray!
CSS:
table{
align: center;
border-width: 1px;
border-style: solid;
border-color: #00ffff;
padding: 0;
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:0;
}
td{
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:0;
border-width: 1px;
border-style: solid;
border-color: #00ffff;
padding:5px;
}
HTML:
<table>
<tr>
<td>MSN</td>
<td>[email protected]</td>
</tr>
<tr>
<td>AIM</td>
<td>Mr Initial Man</td>
</tr>
<tr>
<td>YIM</td>
<td>mrinitialman</td>
</tr>
<tr>
<td>ICQ</td>
<td>147433425 <strong>(I'm rarely on this one)</strong></td>
</tr>
<tr>
<td>E-mail</td>
<td>[email protected]<br>
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --></td>
</tr>
</table>
What I am trying to do is close up the space between the cells so their borders are touching.
I also want to center the table. How do I do this?Start by putting this stuff together:
border-width: 1px;
border-style: solid;
border-color: #00ffff;
like this : border:1px solid #00ffff;
then replace this :
margin-top:0;
margin-left:0;
margin-right:0;
margin-bottom:0;
with this :
margin: 0 auto; (this should centre your table)
and change this :
padding:5px;
to this:
padding:0px; (this might fix your problem).Put a border-collapse:collapse; in your table style.Well, everything worked except your last bit of advice: the <td> padding only controls how close the border is to the text, not how close the cells are to each other. Nor does the centering work in IE.Thanks, Ray!