homepage Welcome to WebmasterWorld Guest from 54.234.2.88
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Replacing Cellpadding/Cellspacing
kriskd




msg:3072850
 11:30 pm on Sep 5, 2006 (gmt 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. :(

 

bedlam




msg:3072855
 11:34 pm on Sep 5, 2006 (gmt 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

kriskd




msg:3072884
 12:05 am on Sep 6, 2006 (gmt 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!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved