Register  |  Login



Earn money by sharing your knowledge through Quomon's revenue sharing program

Question

Status: Closed Points: 75 Time: 09:53 - Nov 02, 2007  

john2

How do I set Cell Spacing in CSS?

I am looking to set a table's cell spacing in CSS, can you show me how that is accomplished?

Answer Discussion
Tutorials

 

Q&A System for Websites and Corporate Collaboration

Advertisement

  • Generates significant organic traffic for websites
  • Saves companies money, resources, and time

rcastagna

Date:: Nov 07, 2007

Time:: 07:28

John,

Well, the parent container - in your case, the <table> tag has a built-in measure called Cellspacing which renders a pixel void between all cells in the table.

If you're looking to just add a bit more "whitespace" to an individual cell, you can look at increasing the padding of that cell, but it may have undesirable effects on the adjoining cells.

I hope this helps,
Ric

john2

Date:: Nov 08, 2007

Time:: 06:50

Hey Ric,

I was hoping that I would just be able to effect the spacing between cells, not the padding.

Is there any way to accomplish that with CSS?

rcastagna

Date:: Nov 27, 2007

Time:: 16:01

John,

Sadly, the Cellspacing property of the <table> affects the void on all sides of the cell. If you're looking for left and right-side padding, you can do it with CSS by creating a class and using that class on the desired cells.

Here's the rub...anything you do that effects the width of one cell, effects the width of all cells above and below it.

You may want to look at using a pure CSS solution...if you want to post a code sample, maybe I can help you brew something up.

Take care,
ric

Question Answered

This question has been closed, and points have been rewarded to the following experts:

rcastagna: 75

You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

No tutorials have been submitted yet. Want to be the first?

Answer this Question

New User

Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:

Forgot Your Password?

Ask a Question

Have a new question? Ask!

You have 100 characters to use



Top CSS Experts

View More

Rank

Expert

Points

1.

rcastagna

75

Become an Expert

Register today to share your knowledge with the community and be recognized and rewarded for your contributions.


Register Here




"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it



Language Options

English:

www.quomon.com

Español:

www.quomon.es