Eliminating visible table borders?

Thread Solved

Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Eliminating visible table borders?

 
0
  #1
Feb 22nd, 2007
I built a php-driven form that is intended to have its results printed out and shipped to another location. The results are laid out as a set of tables that hold the information in place. I tested the page on a system wher ethe default browser isFirefox, which displayed the tables without any kind of border. However, when I transfered over to the system which will actually be running the form, I discovered that the default browser there is IE, and that in IE, there are some nasty borders and partial borders (some tables only have one line for the top border, but two for the sides and bottoms) visible, and I'm fairly sure those will be printed out as well. What methods are there to eliminate visible borders from a table that's being displayed in IE?

Thank you for your consideration,
EnderX
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Eliminating visible table borders?

 
0
  #2
Feb 23rd, 2007
you can turn them off on the table tag itself:

<table border="0"><tr><td>etc</td></tr></table>
(this will turn off the border throughout that table)

or with CSS:

table
{
    border-style:none;
}
(this will disable borders for all tables on a page that includes that rule)

I prefer to do it manually (first example) on all tables, and then turn them on where I want them with CSS.

The partial borders happen when you have cells without data in them.. if you wanted an unbroken border, just put this into otherwise empty cells:
HTML and CSS Syntax (Toggle Plain Text)
  1. &nbsp;
It will force the cell to 'exist' and be rendered with a proper border.
Last edited by MattEvans; Feb 23rd, 2007 at 3:58 am.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Re: Eliminating visible table borders?

 
0
  #3
Feb 23rd, 2007
Thanks for the advice. For some reason the css code didn't want to work right (remember how I said there were two lines in the visible borders? Css code only got rid of one) but the ="0" worked like a charm. Everything appears to be working quite nicely now. Again, thanks.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Eliminating visible table borders?

 
0
  #4
Feb 27th, 2007
To get rid of both lines, you have to set the attribute for both the table and the td tag (and th if you use it).

To remove the space between the borders, use cellspacing="0" in the table tag.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC