PDA

View Full Version : How do you--?



liquidbabe
December 30th, 2001, 18:32
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
December 30th, 2001, 18:44
Meow shall no doubt post an CSS way (:D), but here's my method:
<table border="0" cellpadding="1" cellspacing="0" bgcolor="_border_color_"><tr><td>
<table border="0" cellspacing="0" bgcolor="_page_bgcolor_"><tr><td>
_content_here_
</td></tr></table>
</td></tr></table>That's also the method used to make the borders on the tables here on this forum.

keith
December 30th, 2001, 19:04
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
December 30th, 2001, 19:08
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.

keith
December 30th, 2001, 21:16
NetscapeŽ Communicator 4.01adon't know the differences between navigator and communicator, but that's what i use to give my html the shakedown.

liquidbabe
December 31st, 2001, 15:19
: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
December 31st, 2001, 23:20
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?

Jan
December 31st, 2001, 23:44
Just add another <td></td> for a new cell :)

xsnetwork
January 1st, 2002, 08:41
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

liquidbabe
January 1st, 2002, 11:11
Border around each cell as well! :p

xsnetwork
January 1st, 2002, 11:39
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


<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!!

liquidbabe
January 2nd, 2002, 10:30
Thanks, XS-- I'll try it out today! :cool:

Sikes
January 2nd, 2002, 11:25
Here's a CSS way to do it. I don't know if it works in all browsers, but give it a shot:

<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 ;)

funshine
January 5th, 2002, 04:47
CSS DOESN'T work with all browsers! I think it works only with the new ones...