table outlining

Status
Not open for further replies.

Coleman

Ars Legatus Legionis
16,790
Subscriptor
I've used a double nested table in the past to create a nice thin border.
You set the outer table to be one cell, the width that you want, and se the background color to whatever color you want. then set the other table with each cell to the proper forground color you want for the background behind the contents, set the cellpadding to 0 and the cell spacing to 1. Create a single line, non-beveled border.

Although I think it might not be as elegent as some of the other approaches.

-J
 
<table width="500" border="1" cellspacing="0" cellpadding="3" bordercolor="#000000">
<tr bordercolor="#FFFFFF">
<td>top left</td>
<td>top middle</td>
<td>top right</td>
</tr>
<tr bordercolor="#FFFFFF">
<td>bottom left</td>
<td>bottom middle</td>
<td>bottom right</td>
</tr>
</table>


Like this?

edit: infopop is adding the space at the beginning..
edit: this isn't very Netscape friendly, but it doesn't use any CSS either.
 

HitScan

Ars Tribunus Militum
2,523
Subscriptor++
SG: That's a bug in the way Infopop parses messages with HTML. You've got linebreaks in your table tags don't you? ;)
If you markup the table the way you want, and remove all linebreaks, it turns out the way you expect. It's also a pain getting it to be anything but 100% width too... (you've got to mess with the style tag... blah.)

HitScan
 

E3

Ars Centurion
387
thanks for all the help.


Originally posted by colema19:
I've used a double nested table in the past to create a nice thin border.
You set the outer table to be one cell, the width that you want, and se the background color to whatever color you want. then set the other table with each cell to the proper forground color you want for the background behind the contents, set the cellpadding to 0 and the cell spacing to 1. Create a single line, non-beveled border.

Although I think it might not be as elegent as some of the other approaches.

-J

Hi, are u saying 1. create table, add a cell in it, add bgcolor
2. Then create another table in it with cells to the layout I wanted.

I can't seem to add another table onto a cell using dreamweaver?

Btw whats a px?
And I found something that maybe useful using ccs
http://www.w3schools.com/css/pr_border-bottom_width.asp
 

Plasdom

Ars Tribunus Angusticlavius
6,704
px stands for pixel. 1 pixel will give you the thin outline for your table.
Here's the code for a table with a thin outline:

Code:
 <table width="100%" cellpadding="0" cellspacing="0" style="border: 1px solid red">
<tr><td>Your text here</td></tr>
</table>
replace red with a color of your choice. You can also use hex values instead of color.
eg:
style="border: 1px solid #000000"
will give you a thin black outline
 

E3

Ars Centurion
387
Thanks, I m quite a html idiot. I managed to get it right earlier on by viewing source of the thread :)


Right now I trying the set thin outline for the cells within the table. However it seems that the cells are redrawing over eachother and makes the lines dark again, any idea how to handle this?

Btw, how do u display the tags without being parse/displayed by the board.
 

Coleman

Ars Legatus Legionis
16,790
Subscriptor
Sorry, I do most of my HTML by hand, so I can't help ya with the dreamweaver. But yeah, that's about the gist of it. By using a cellspacing, the bg color of the cell of the outer table shows through the "cracks" between cells of the inner table. i.e.:

Code:
<!-- outer table-->
<table border='0' cellpadding='0' cellspacing='0' width='800'>
	<tr>
		<td bgcolor='navy'>
			<!--inner table, cell line colors defined by the bgcolor of the preceeding <td>-->
			<table border='0' cellpadding='0' cellspacing='1' width='100%'>
				<tr>
					<td bgcolor='white'>
						This should be black text with a navy blue border around the cell.
					</td>
				</tr>
			</table>
			<!--/inner table>
		</td>
	</tr>
</table>
<!--/outer table-->


Does Netscape obey px? For some reason I thought it was an IE thing.
-J
 
Status
Not open for further replies.