[css-d] A Question about cell spacing
Excuse me. I am having one of those getting older momenents. I am putting together a CSS file and I remember cell padding is Padding: 1em;, however, what is cell spacing? Angus MacKinnon MacKinnon Crest Saying Latin - Audentes Fortuna Juvat English - Fortune Assists The Daring Web page http://www.infoforce-services.com Choroideremia Research Foundation Inc. 2nd Vice president http://www.choroideremia.org __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] A Question about cell spacing
From: Angus MacKinnon Sent: Friday, May 05, 2006 12:40 PM Excuse me. I am having one of those getting older momenents. I am putting together a CSS file and I remember cell padding is Padding: 1em;, however, what is cell spacing? Angus, I generally include cellpadding and cellspacing on my table tag table cellspacing=0 cellpadding=0 then include a rule to collapse borders on the table element table { border-collapse:collapse; } and set padding as desired: td, th { padding:1em; } HTH. --G __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] A Question about cell spacing
Visually Insane Genetically Modified Organism wrote: Excuse me. I am having one of those getting older momenents. I am putting together a CSS file and I remember cell padding is Padding: 1em;, however, what is cell spacing? Angus, The CSS equivalent of cellspacing is to first set border-collapse to separate, then set the border-spacing property to whatever value you like (both on the table element). But this is not supported by WinIE, MacIE, or NN4.x. Zoe -- Zoe M. Gillenwater Design Services Manager UNC Highway Safety Research Center http://www.hsrc.unc.edu __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] A Question about cell spacing
The CSS equivalent of cellspacing is to first set border-collapse to separate, then set the border-spacing property to whatever value you like (both on the table element). But this is not supported by WinIE, MacIE, or NN4.x. Zoe Angus: One could also set margins on the individuals cells which function in the same manner as border-spacing, even over-writing the border-collapse setting. Surprise of all surprises though...this won't work in IE either. I don't know how all the browsers Zoe cited will react to it, but IEWin is a definite no-go. The use of MSIE's proprietary CSS expressions might be a consideration though. I've included a little code snippet below which should allow you to set border-spacing in MSIE and other browsers. If you set border-collapse to collapse, IE will still set the spacing, while Firefox at least seems to ignore border-spacing once collapse is set. Firefox is probably in accordance with the specs--I didn't look it up, but I'd lay money on it. Anyway, code below...hope it helps. Bill Brown Webmaster, MacNimble.com Code, as promised. Please ignore the lack of thead, tbody, etc. Also, note that expressions do not validate and require scripting on the client side, which the user must have enabled. You can counteract the validation factor by wrapping the rule in a separate style section and enclosing the style tag in MSIE's other very popular (ahem) proprietary bit of genius: The Conditional Comment. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html head titleUntitled/title style type=text/css /* ![CDATA[ */ #wCSS { border: 1px solid #009; border-collapse: separate; border-spacing: expression(cellSpacing=20); /* for IE */ border-spacing: 20px; padding: 0; } #wCSS td { border: 1px solid #009; padding: 2px 5px; position: relative; /* for IE */ } #woCSS { border: 1px solid #009; border-collapse: separate; border-spacing: 20px; padding: 0; } #woCSS td { border: 1px solid #009; padding: 2px 5px; position: relative; /* for IE */ } /* ]] */ /style /head body table id=wCSS tr tdcell one/td tdcell two/td /tr tr tdcell three/td tdcell four/td /tr /table table id=woCSS tr tdcell one/td tdcell two/td /tr tr tdcell three/td tdcell four/td /tr /table /body /html ___ $0 Web Hosting with up to 200MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] A Question about cell spacing
On May 6, 2006, at 4:54 AM, Bill Brown wrote: One could also set margins on the individuals cells which function in the same manner as border-spacing, even over-writing the border-collapse setting. margins do **not** apply to elements with display:table-cell. http://www.w3.org/TR/CSS21/box.html#propdef-margin quote Applies to: all elements except elements with table display types other than table-caption, table and inline-table /quote border-collapse:separate is supported by Opera, Konqueror and Safari (buggy), Gecko, iCab, but not by iExploder 6 and 7 and IE Mac The html code table border-spacing=10 is perfectly valid, and can be overridden by a stylesheet for better browsers example: table {border-collapse:separate; border-spacing: 1em 2em /* value for horizontal spacing and then vertical spacing */} Philippe --- Philippe Wittenbergh http://emps.l-c-n.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/