• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

Black border

It's fairly simple, all I want is a table with a BLACK border (in Netscape). I have set the bordercolor, bordercolorlight and bordercolordark properties. But still it's NOT black... I hope someone can help me. My HTML is a bit rusty :-/

Regards,
CJ
0
CJ_S
Asked:
CJ_S
  • 6
  • 5
  • 2
  • +1
1 Solution
 
a.marshCommented:
I take it you don't want to use the "workaround" of "building" a border using background colour and a transparent gif in the table?

I find Netscape very inconsistent when it comes to border colours and the like, on tables.....

:o)

Ant
0
 
CJ_SAuthor Commented:
Nope...

the following was my latest "invention", but it keeps some space between the boundaries

<html>
 <head>
  <style type='text/css' disabled>
  DIV.b{border:1px solid black;padding:20px;}
  </style>
 </head>

 <body bgcolor=yellow>
 <div class='b'>
 <table border=0 cellspacing=0 cellpadding=0 bordercolor=black bgcolor=black>
  <tr>
   <td>TEST</td>
  </tr>
 </table>
 </div>

</body>
</html>
0
 
CJ_SAuthor Commented:
padding:0px or no padding in the style :-)
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
a.marshCommented:
The "workaround" I mentioned

<table width="104" border="0" cellpadding="0" cellspacing="0">
<tr>
  <td width="2" rowspan="3" bgcolor="#000000"><img src="clear.gif" width="2" height="5"></td>
  <td width="100" bgcolor="#000000"><img src="clear.gif" width="5" height="2"></td>
  <td width="2" rowspan="3" bgcolor="#000000"><img src="clear.gif" width="2" height="5"></td>
</tr>
<tr>
  <td>Content goes here - might want to put another table in to get better margin space etc.</td>
</tr>
<tr>
  <td bgcolor="#000000"><img src="clear.gif" width="5" height="2"></td>
</tr>
</table>


Ant
0
 
a.marshCommented:
I know you new that anyway!! :oP

Ant
0
 
a.marshCommented:
You mean when you set the padding to 0px, you should get a solid back box?

Ant
0
 
CJ_SAuthor Commented:
yep, like in Internet Explorer.

I really hope to get this straight for once and for all, because sometimes the 1 pixel width cells are pretty annoying :-) and can be disturbed rather easily.

Regards,
CJ
0
 
a.marshCommented:
Well I'm using Netscape 4.x on Linux and there is more than a 1 pixel width on the example code you gave above (obviously changing the 20px to 0px!)

:o)

Ant
0
 
CJ_SAuthor Commented:
0px still shows some blank space :-/
0
 
a.marshCommented:
It does and I'm can only assume it is because of the way Netscape works with the <div>

Ant
0
 
webwomanCommented:
Where do you want the border? Around all the cells, around the table, or only around some cells? All of them are pretty easy, just takes some table tricks.

Around the table --
Set up a container table, 1 row 1 cell, set cellPADDING to the border you want. Give the one cell a background of black. Set the background color on the inside table to the background color of the page (I'm assuming white).

Around all the cells --
Set up a container table again, but set cellSPACING on the INSIDE table to what you want the border to be. You still need the cellPADDING on the OUTSIDE table to get the outside border.

On some of the cells --
This is where it gets trickier. It needs to be set with fixed pixel sizes. YOu have to set up those cells with the black background and aligned center, and nest in them another table, sized to be however many pixels narrower as you want your border to be. If you want a one pixel border, the inside table has to be 2 pixels smaller. You can use cellpadding if you want ALL the cells in the table to have that much space, otherwise you need to set the inside table size.

You notice there are NO transparent GIFs in this.... ;-) You can use them, and I have for other things, but you can get around it.
0
 
Michel SakrCommented:
the best workaround I always use is to create a table and set in the border row cells (2) and column cells (2) 1x1 pixel images and set their width/height empty.. this way the cell will get the img width or height and you will get a nicely formatted border and the best thing that it's cross browser compatible.. check the similar yellow borders I made here www.iband.sh
0
 
CJ_SAuthor Commented:
I know about all those options, I was actually hoping for a way with the attributes specified, or with one additional tag (like with the div tag in my example).

I just implemented the usual way with 1 pixel wide cells. I dislike the approach but there's no other way I guess.

regards,
CJ
0
 
Michel SakrCommented:
Heh webwoman got that.. first.. lots of concurrency on HTML.. I'll better go back to ASP
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 5
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now