• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net

How do you--?

liquidbabe

New Member
Here's my question:

How do you get thin borders around your tables? I'm not talking about the sorta thin line you get when you set the border to "1" and set the cellspacing to "0." That gives you a thin line, but not the type I've seen that is thinner than that line. How do you get it? Is it with CSS? Or graphics, even?
 

Dusty

NLC
NLC
Meow shall no doubt post an CSS way :)D), but here's my method:
Code:
<table border="0" cellpadding="1" cellspacing="0" bgcolor="[b]_border_color_[/b]"><tr><td>
<table border="0" cellspacing="0" bgcolor="[b]_page_bgcolor_[/b]"><tr><td>
[b]_content_here_[/b]
</td></tr></table>
</td></tr></table>
That's also the method used to make the borders on the tables here on this forum.
 

keith

anti-liberal
NLC
might try putting bgcolor in the <td> tags rather than <table> tags... netscape doesn't support bgcolor in the <table>, but does support it in <td>

well, newer versions of netscape might, but the version i use to doublecheck my pages with doesn't.
 

Dusty

NLC
NLC
might try putting bgcolor in the <td> tags rather than <table> tags... netscape doesn't support bgcolor in the <table>, but does support it in <td>

well, newer versions of netscape might, but the version i use to doublecheck my pages with doesn't.
Works in Netscape 4.x and 6.x, I don't have one from version three loaded on this computer but if I remember right it works on it too. Doesn't work on 1.x, but then neither do tables at all. Are you using version two? I've never seen two, so I can't speak for it.
 

liquidbabe

New Member
:jump:

Ohhhhh, so THAT's how it's done! Geez, I've been searching high and low trying to figure that one out. Even tried at Bravenet forums and got a smartass answer! :mad:

Thank you, thank you, a thousand times thank you!!!! :biggrin2:
 

liquidbabe

New Member
One more question, though!

If I wanted this type of table with more than one cell, would I have to continue inserting a new table into each cell?
 

xsnetwork

New Member
Originally posted by liquidbabe
One more question, though!

If I wanted this type of table with more than one cell, would I have to continue inserting a new table into each cell?
Well it depends if you want the border around the whole table or each individual cell
 

xsnetwork

New Member
there is a cross browser compatible way to do it, but I have forgot it *d'oh* anyway, I know the way which will work in IE and perhaps newer versions of Netscape
Code:
<table cellspacing="1" cellpadding="0" border="0" bgcolor="_border_colour">
<tr>
<td bgcolor="_page_bg">
_first_cell_content
</td>
<td bgcolor="_page_bg">
_second_cell_content
</td>
</tr>
<tr>
<td bgcolor="_page_bg">
_first_cell_second_row
</td>
<td bgcolor="_page_bg">
_second_cell_second_row
</td>
</table>
the others will probably be able to tell you the other way which has escaped my mind!!
 

Sikes

New Member
CSS Way

Here's a CSS way to do it. I don't know if it works in all browsers, but give it a shot:
Code:
<table cellspacing="0" cellpadding="3">
<tr><td style="background-color : White; border : 1px solid Black;">Your content</td></tr></table>
You can set the cellspacing and cellpadding to whatever you want. And in the <style="background"> part, you can put whatever color you want, same with the border.

Try it, I never actually seen it before today, looks pretty neet ;)
 
Top