CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 8th, 2002, 04:07 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,097 kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 2 Weeks 5 Days 22 h 23 m 36 sec
Reputation Power: 532
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
CSS to control CELLSPACING in tables

I'm wondering if there is any CSS element that can control the cellspacing attribute of a table. I'm making a PHP script that will output tables to show some information, and the output will be put into a template. Inorder to allow people to control the looks of what my script makes, i've been giving everything an ID. The only thing so that that I havn't been able to do, is set the table's cellspacing attribute to 0 so that there is no space between the borders.

Here is a sample page of that it will currently do as apposed to what I want it to do.

http://kicken.mine.nu:8008/extras/spacing.html

In the second table, I set the cellspacing to 0 so you can see, but I want to be able to use CSS to do that.

Anyone know of any property(margin: and padding: don't work, tried both) that I may be looking for?

Reply With Quote
  #2  
Old December 8th, 2002, 05:14 PM
sacrilege sacrilege is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Norwich, UK
Posts: 53 sacrilege User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 1 m 53 sec
Reputation Power: 6
Bottom line: I don't think it's possible.

I wanted to set cellspacing using CSS a while back, after some extensive testing and trawling through the CSS2 specification a few times I came up with nothing. In the end I had to manipulate the table's cellSpacing property via JavaScript. I can't help but feel that I missed something though, why on Earth it wouldn't be available is beyond me...

Reply With Quote
  #3  
Old December 8th, 2002, 06:19 PM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 13
http://www.w3schools.com/css/pr_tab_border-collapse.asp

Code:
<table width="100" border="1" style="border-collapse: collapse">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

Reply With Quote
  #4  
Old December 8th, 2002, 08:26 PM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,097 kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)kicken User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115670 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 2 Weeks 5 Days 22 h 23 m 36 sec
Reputation Power: 532
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
Ahh, so that's what that does. Changes the color a bit but that's no big deal. Thanks degsy

Reply With Quote
  #5  
Old December 8th, 2002, 08:30 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
border-collapse is crucial here - but cellspacing is done to individual tds using margin, and cellpadding uses, hem, padding, also applied to the cell. If you apply them to the table element, the entire table gets spaced/padded (as a block).

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS to control CELLSPACING in tables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway