Static
08-05-2004, 04:37 AM
Hello.
I've got a question about table borders.
http://www.zeldauniverse.net/main.php?page=staff
On that site, you can see a THIN border.
I've been trying to get a border like that, but I can't even get that when I put the border as 1.
http://www.thetriforce.net/main.php?id=cartoons
You can see a fat border.
This is both when using IE.
Any help would be appreciated.
Thank you
alpha
08-05-2004, 05:51 AM
I haven't looked at the source, but a thin border like that can be done by embedding a table within a table.
Like this:<table cellpadding="1" border="0">
<tr><td bgcolor="black">
<table bgcolor="white" border="0"><tr><td>test</td></tr></table>
</td></tr>
</table>
Burhan
08-05-2004, 06:48 AM
You can also use CSS to get all sorts of borders:
<table style="border:1px thin black">
<table style="border:1px double green">
etc.
VolkNet
08-05-2004, 06:44 PM
I dont know if this works you could try and see if
border=".5" would work... try it! :)
cyberlot
08-05-2004, 07:13 PM
border-collapse: collapse
This I find is the easiest way to create a nice clean 1 line border.
nnormal
08-06-2004, 12:00 PM
re: alpha
it should be cellspacing="1" rather than cellpadding="1"
cellpadding is the space between a cell border and its contents
As fyrestrtr said although i don't think there's any need to use a numerical value and a named value in the same rule (e.g 1px and thin) it would still work, but not be of any benefit i don't think. Use either:
style="border:1px solid black"
or
style="border:thin solid black"
The first will be a smaller border than the second, and mabye this helps some more: http://netcode.net/tutorials/js/tables02.php
alpha
08-07-2004, 06:30 PM
Originally posted by nnormal
re: alpha
it should be cellspacing="1" rather than cellpadding="1"
cellpadding is the space between a cell border and its contents
To me, cellpadding makes more sense since the cell that the inner table is in is being padded by 1px and since this cell is black, it will create a 1px padded border around the inner table.
I use cellspacing when I'm trying to separate a cell from other cells and not separate the cell content from its borders.
Both will work equally, in the end, because there is only one cell in the outer table and this cell's border is set to 0.
Of course, this is the old way of doing borders now as others have mentioned. Unless you're trying to avoid using css...