Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cell with a 1 pixel image border 1

Status
Not open for further replies.

rahmanjan

Programmer
Apr 13, 2003
180
AU
Hi all,

I am trying to make a table in such a way that a cell (the one that i want to write to) is surrounded by a rectable, the rectangle has a one pixel image as an border ...

Do i need to set the 1 pixel image as background of the rectangle cell, border or what? I tryed that but not very luck.

any comment , tip will be appreciated.
any other alternative?

regards,
 
The only way to do this using images would be to set up a 3 x 3 table and use the 1 pixel image as the background for each of the eight outside cells, then write to the middle cell - bleh.

For a beautiful one pixel border use css.
In the head of your document:
[tt]<style>
.borderedCell { border: 1px solid #00FF00 }
</style>[/tt]

Then when you declare your cell in the body of your document add the class attribute:

[tt]<td class=&quot;borderedCell&quot;>Blah Blah</td>[/tt]

Of course, you may want to change the colour of the border to something other than bright green, just add the colour name or hex value in place of the #00FF00 in the style declaration.
 
Hi,

YOu got my stat. But it didn't solove my problem. the problem was that NN doesn't show the table border thing. I don't know why. Stupid NN. so i wanted to handle that problem. I thought your tip will solve the issue. But unfortunately still same?

any other solutions?

regard

raman
 
Yep, go the first option, 9 cells instead of 1, images in the external cells that link up to form a border, a-la:
[tt]<table>
<tr>
<td><img src=&quot;topleft.gif&quot;></td>
<td><img src=&quot;topmid.gif&quot;></td>
<td><img src=&quot;topright.gif&quot;></td>
</tr>
<tr>
<td><img src=&quot;leftmid.gif&quot;></td>
<td>Content Goes Here</td>
<td><img src=&quot;rightmid.gif&quot;></td>
</tr>
<tr>
<td><img src=&quot;botleft.gif&quot;></td>
<td><img src=&quot;botmid.gif&quot;></td>
<td><img src=&quot;botright.gif&quot;></td>
</tr>
</td>[/tt]

Ugly code, but effective.
 
yamjam,

As you see in the example above, supporting Netscape 4 slows everything down. Are you sure it is worth supporting the few people that don't bother to upgrade to a more recent free browser?

Gary Haran
==========================
 
xutopia,

you reckon other versions of NN are supporting table and frame border colour?

regards,

rahman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top