Solved

Black border

Posted on 2001-06-25
14
276 Views
Last Modified: 2010-04-09
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
Comment
Question by:CJ_S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
  • +1
14 Comments
 
LVL 15

Expert Comment

by:a.marsh
ID: 6224326
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
 
LVL 22

Author Comment

by:CJ_S
ID: 6224341
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
 
LVL 22

Author Comment

by:CJ_S
ID: 6224345
padding:0px or no padding in the style :-)
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 15

Accepted Solution

by:
a.marsh earned 100 total points
ID: 6224351
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
 
LVL 15

Expert Comment

by:a.marsh
ID: 6224356
I know you new that anyway!! :oP

Ant
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6224376
You mean when you set the padding to 0px, you should get a solid back box?

Ant
0
 
LVL 22

Author Comment

by:CJ_S
ID: 6224398
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
 
LVL 15

Expert Comment

by:a.marsh
ID: 6224405
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
 
LVL 22

Author Comment

by:CJ_S
ID: 6224441
0px still shows some blank space :-/
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6224472
It does and I'm can only assume it is because of the way Netscape works with the <div>

Ant
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6224581
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
 
LVL 20

Expert Comment

by:Silvers5
ID: 6224583
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
 
LVL 22

Author Comment

by:CJ_S
ID: 6224591
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
 
LVL 20

Expert Comment

by:Silvers5
ID: 6224593
Heh webwoman got that.. first.. lots of concurrency on HTML.. I'll better go back to ASP
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question