Select Categories Below
Status: Closed Points: 75 Time: 09:53 - Nov 02, 2007
john2
I am looking to set a table's cell spacing in CSS, can you show me how that is accomplished?
Categories:
Add Categories
When adding more than one category, separate them with commas.
Advertisement
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
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?
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:
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?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
How do I set the margin for a Cell in CSS?
How do I set a cell's width in CSS?
How do I get a cell to fill the remainder of a width percentage in HTML tables?
You have 100 characters to use
Rank
Expert
Points
1.
75
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 it
Language Options
English:
Español:
Sponsors
Questions and Answers Software Real Estate Postcards Marketing Fulfillment