Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2006, 08:01 AM
Registered User
 
Join Date: Sep 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default CSS for Table cellspacing and cellpadding

I have created CSS for table which is destined to set the CellSpacing and CellPadding. But it does not work for any table. However border can getting effect from CSS.

Please help me out to create CSS for setting CellSpacing and CellPadding for HTML Table (only by CSS).

 
Old March 17th, 2006, 08:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

For padding you use use any padding property, applied to TD and TH.
http://www.w3.org/TR/REC-CSS2/box.ht...ing-properties

For the counterpart to cellspacing, read here:
http://www.w3.org/TR/REC-CSS2/tables.html#borders

In CSS there are two border models. You'd want to use the separate border model, making sure that's what you get by setting 'border-collapse' to 'separate'. Then you use 'border-spacing' much as you would cellspacing.

You may want to read the whole Tables page, because many things are different from HTML.

--
http://yupapa.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrolling table with CSS: Almost there! asearle XSLT 1 November 24th, 2007 10:13 AM
CSS for Table border. rupen CSS Cascading Style Sheets 2 March 29th, 2006 09:41 AM
cellpadding="0" cellspacing="0" in CSS crmpicco CSS Cascading Style Sheets 2 November 18th, 2005 07:30 AM
what is table cellspacing equivalent in css? nerssi CSS Cascading Style Sheets 5 September 19th, 2004 09:48 AM
what is table cellspacing equivalent in css? nerssi Javascript 1 September 19th, 2004 02:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.