Welcome to WebmasterWorld Guest from 54.198.229.157

Forum Moderators: not2easy

Message Too Old, No Replies

Replacing Cellpadding/Cellspacing

     
11:30 pm on Sep 5, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 12, 2003
posts:164
votes: 0


I'm trying to find the equivalent CSS for equivalent of <table cellspacing="0" cellpadding="0" border="0"> and I got something that works beautifully in FF:

table {border-spacing:0px;
border-collapse: separate;}

td {padding:0px;
border:0px none;}

However, I still geting padding/spacing when viewing it in IE. Any cool work arounds? I'd hate to have to revert back to the cellspacing & cellpadding. :(

11:34 pm on Sept 5, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 30, 2003
posts:728
votes: 0


Try this. You were actually using the wrong value for 'border-collapse':

table {
border-collapse:collapse;
border:1px solid #000;
}

th,
td {
padding:0;
border:1px solid #000;
}

I just put the borders in there so you could see it working--just take 'em out. "border-spacing" is not, if I remember correctly, supported by IE6.

-b

12:05 am on Sept 6, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 12, 2003
posts:164
votes: 0


Major duh moment for me! I think that separate got left in there from playing around and I sort of new that collapse was what I needed. Thanks for pointing out the error of my ways!