CSS equiv for cellspacing & cellpadding

T

Todd Cary

I have not been able to find the CSS equivalents to the table properties

cellspacing
cellpadding

I tried using

Table {
border-color: #FFFFFF;
background-color: #FFFFFF;
width: 100%;
border: 0;
padding: 0;
margin: 0;
}

but I still get spacing.

Todd
 
J

Jeffrey Silverman

I have not been able to find the CSS equivalents to the table properties

cellspacing
cellpadding

I tried using

Table {
border-color: #FFFFFF;
background-color: #FFFFFF;
width: 100%;
border: 0;
padding: 0;
margin: 0;
}
}
but I still get spacing.

Todd

Try

padding:0px;

I think that will help. But it might not.
 
O

oo-

Todd Cary said:
I have not been able to find the CSS equivalents to the table properties

cellspacing
cellpadding

I tried using

Table {
border-color: #FFFFFF;
background-color: #FFFFFF;
width: 100%;
border: 0;
padding: 0;
margin: 0;
}

but I still get spacing.

Todd


try

table{
border-collapse: collapse;
}

yopu may have to apply this to the tds and ths e.g.

th, td{
border-collapse: collapse;
margin: 0;
}

i think there is also a border-spacing attribute for which you can assign
the value of 0 or none but I'm not sure of its effectiveness.

Phil
 
T

Todd Cary

Phil -

border-collapse: collapse;

That took care of part of the problem.

I have not been able to find the CSS equivalent of table property,
cellpadding.

I went through www.blooberry.com, no definitive answers. I'll just
leave the property in place for the time being.

Todd
 
T

Todd Cary

I tried

padding: 0;

However, the fine line still exists. If I put the property

padding="0"

in the table tag, the fine line disappears.

Todd
 
T

Todd Cary

Sam -

I tried

padding: 0;

also

padding: 0px;

However, the fine line still exists between two rows. If I put the property

padding="0"

in the table tag, the fine line disappears.

Todd
 
K

kchayka

I tried
padding: 0;

However, the fine line still exists. If I put the property
padding="0"

in the table tag, the fine line disappears.

It sounds like you may be (ab)using layout tables. If you're not, why
would anyone care about a pixel or two? If you *are* using layout
tables, what do you hope to gain from defining things like cellpadding
in CSS? Maybe it would clarify your situation if you posted a URL.

And please don't top-post in this newsgroup. thanks for your cooperation.
 
T

Todd Cary

kchayka said:
It sounds like you may be (ab)using layout tables. If you're not, why
would anyone care about a pixel or two? If you *are* using layout
tables, what do you hope to gain from defining things like cellpadding
in CSS? Maybe it would clarify your situation if you posted a URL.

And please don't top-post in this newsgroup. thanks for your cooperation.

Here are two versions for my client per their specs:

With cellpadding="0" as a property

http://209.204.172.137/nasd/php/login.php


Without cellpdding="0" as a property, however the CSS contains
{padding: 0px;}

http://209.204.172.137/nasd/php/login_2.php
 
R

rf

Todd said:

That page is a gross misuse of both tables and CSS. The tables are about
three times as complex as the layout requires, even when using tables for
layout purposes. The CSS is about 10 times too complex and verbose. I for
one would never even attempt to troubleshoot it. Given the job as a paying
proposition I would simply rewrite the page, probably saving the client some
money in the process.

If you were to write it from the ground up you would have far less chance of
confusing the browser. You should expect the HTML file to be no longer than
about 20 to 30 lines. The CSS should be at most three rules with no more
than 10 properties mentioned between them.
 
T

Todd Cary

rf said:
Todd Cary wrote:




That page is a gross misuse of both tables and CSS. The tables are about
three times as complex as the layout requires, even when using tables for
layout purposes. The CSS is about 10 times too complex and verbose. I for
one would never even attempt to troubleshoot it. Given the job as a paying
proposition I would simply rewrite the page, probably saving the client some
money in the process.

If you were to write it from the ground up you would have far less chance of
confusing the browser. You should expect the HTML file to be no longer than
about 20 to 30 lines. The CSS should be at most three rules with no more
than 10 properties mentioned between them.
Your comments are greatly appreciated, and I am going to pass them onto
my client. My client administers about 60-70% of the large class action
lawsuits (e.g. Enron, Microsoft, Dow Chemical), and they like me to use
their generic page layout ( http://209.204.172.137/generic/ ).

I'll try to get them to modify their specs.

Thank you again for taking the time.....

Todd
Ariste Software
Petaluma, CA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top