Return to the Web Authoring Forum | Post a Follow-Up

 o
table borders-Netscape

Posted by Carawood (My Page) on
Mon, Feb 4, 02 at 14:27

I need to put a box (or border around the outer edges) of a table. But WITHOUT having borders around each individual cell inside the table. Sounds easy enough ... but in html, I can't seem to do it easily.

I tried using the border code inside a style sheet ... and that worked, but only in Internet Explorer. I also tried defining a border in the table tag ... then making the borders around the inside cells the same color as the background so they won't show up ... that doesn't work in Netscape either!!! I have the 4.02 version of Netscape Communicator ... maybe the newer version would work better, I don't know.

Any ideas? This is a small table (inside a larger table) that needs a box around it. Doesn't even have to be a nested table ... any other ideas on how to get the box would be great.

Thanks


Follow-Up Postings:

 o
RE: table borders-Netscape

Cara, I have good news and bad news. The bad news is that I don't think old NS will handle the HTML specifications for rules and frames. Here is an excellent discussion of tables, including borders: http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.2.6.1. In theory, one can set rules (for the internal cell borders) and frame (for the outside table border) to various things, including "none", "right", "left" etc., but in practice it doesn't work on Nutscrape 4.7, which I use for testing. It does work well on IE 5.5. So no joy there. Let me say that I've only been doing HTML for a year full-time, so there may be a way to do this I don't know about.

However, there's an easy fix for what you want, and that's just to make another container table outside the table you want a colored border around. The container table contains only 1 cell, so it has no internal cell rules. So it looks just like a border around your inside table. Voila.


[your inside table here ]

BTW, I think the best forum by far for web stuff is Dev Shed. If you don't know it, here's the URL. Search their forums and you'll find almost anything, plus people respond almost immediately, usually within a couple hours.

http://www.devshed.com/

A couple other NS things on tables: several people have posted in other forums that tables and borders work better in NS if the border attribute is listed after cellpadding and cellspacing. I've never noticed this myself, but because NS is such a picky monster, I slavishly follow this advice, even if it's just a superstition. I really, really hate NS....I had a major site ready to go online using IE for development, and then it took a full month of frustration to get it NS compliant. I used to feel sorry for NS and hoped they'd win out against MS, but they've cost me so much time, money, and grief that I hope they all become jobless and end their lives drinking sterno in Bowery Row. What really makes me want to torture the NS developers is that a) they're incredibly picky about the HTML protocol but b) were incredibly sloppy in their execution. A good example is the radio button bug where the page background shows through as ugly splotches around and inside the button, so if you don't want the buttons to look crappy you have to either a) use some really esoteric style sheet stuff which doesn't always work anyway (according to the pros....I stay away from this myself) or b) make sure the buttons are either sitting on the background or in a table cell that is the same color as the background, which is pretty limiting, design wise, or c) accept the smudges. I usually fudge by making the background the same color as the table cell containing radio buttons, and then if I want it to look like there is a different background color, I set the browser offset to 0 (so there isn't much of the background showing) and put a table with 100% width lots of height. It's nasty but works.

Also, if you don't specify border=0, cellpadding=0, cellspacing=0 the defaults in NS are annoyingly to set them all equal to 1. If cellspacing is default = 1, this causes nasty little white cracks (if you've got a white background) between table cells. Other things can cause these cracks too, but absolutely make sure that you're got cellspacing=0.

As for the form size problem in NS, I've forgotten how I solved that. I'll look back and see if I can see in my notes.

Here is a link that might be useful: Great discussion of tables.


 o
RE: table borders-Netscape

Thanks. The table inside the table worked. Good idea. As for the radio buttons, I know what you mean. What a pain! I hate Netscape, too.

By the way, it turned out that the style sheet thing I did (with a border around the outside of the table) worked in the latest version of Netscape. But it still isn't safe to use, since most people probably don't have 6.2 yet.

***The last problem I have is with the size of the form boxes ... so if you do figure out how to handle this in Netscape, please let me know! Thanks so much for all your help.

-Cara


 o
RE: table borders-Netscape

Cara, I posted some suggestions about the NS text input box size problem under the old topic "Form's text box size wrong in Netscape? help?" I hope this helps. As I suggested before, don't forget about DevShed.com for the best forum I've found.


 o Post a Follow-Up

Please Note: Only registered members are able to post messages to this forum.

    If you are a member, please log in.

    If you aren't yet a member, join now!


Return to the Web Authoring Forum

Information about Posting

  • You must be logged in to post a message. Once you are logged in, a posting window will appear at the bottom of the messages. If you are not a member, please register for an account.
  • Please review our Rules of Play before posting.
  • Posting is a two-step process. Once you have composed your message, you will be taken to the preview page. You will then have a chance to review your post, make changes and upload photos.
  • After posting your message, you may need to refresh the forum page in order to see it.
  • Before posting copyrighted material, please read about Copyright and Fair Use.
  • We have a strict no-advertising policy!
  • If you would like to practice posting or uploading photos, please visit our Test forum.
  • If you need assistance, please Contact Us and we will be happy to help.


Learn more about in-text links on this page here