cell padding

liunx

Guest
I want to add a black border around a white cell, how can this be done? (I have the cellpadding set to 2)<!--content-->bordercolor="000000"<!--content-->slayer that is one way to do it however you need to add the # sign in front of those 0's. "#000000" but there is a "cleaner" way to do it, <br />
do like what i did on my site: <!-- w --><a class="postlink" href="http://www.winxpforums.com">www.winxpforums.com</a><!-- w --> <br />
<br />
use this code<br />
<br />
<table cellspacing="1" cellpadding="1" bgcolor="black"><br />
<tr><td bgcolor="white">text</td></tr><br />
<tr><td bgcolor="white">text</td></tr><br />
</table><br />
<br />
its that simple, and depending on the size of the border you want just increase the cellspacing and cellpadding.<!--content-->If you're talking about one particular cell, this is a breeze with CSS - except that certain browsers render styles unpredictably. Here's the old-fashioned (c.1995) way:<br />
<br />
<br />
<table cellspacing="0" cellpadding="2" border="0" bgcolor="#cccc00"> <br />
<tr><br />
<td>text</td><td>text</td><br />
</tr> <br />
<tr><br />
<td bgcolor="#000000"><br />
<table cellspacing="0" cellpadding="2" border="0"><br />
<tr><br />
<td bgcolor="#ffffff">text</td><br />
</tr><br />
</table><br />
</td><br />
<td>text</td><br />
</tr><br />
<tr><br />
<td>text</td><td>text</td><br />
</tr> <br />
</table><!--content-->Will, I am pretty sure that won't work in NS4.xx<br />
<br />
in order for a border to be around a cell you will have to make another table inside that table.. like this<br />
<br />
<html><br />
<head><br />
</head><br />
<body><br />
<table bgcolor=a0b8c8 border="0" cellpadding="2" cellspacing="0" width="50%"><br />
<tr><td><br />
<br />
<table bgcolor="#eeeeee" border="0" cellpadding="2" cellspacing="0" width="100%"><br />
<tr><td bgcolor="#ffffff" align="center"><br />
<br />
something<br />
<br />
</td></tr><br />
<br />
</table><br />
</td></tr><br />
</table><br />
<br />
</body><br />
</html><!--content-->here we go with netscape again!!!!<br />
<br />
:bash::splat: !!<!--content-->he he yup, it is still out there so to make everyone happy you have to code for them. if it wasn't that popular why would yahoo conform to NS users?<!--content-->i dont use yahoo :D i am a google person :P<!--content-->
 
Back
Top