By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,977 Members | 1,369 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,977 IT Pros & Developers. It's quick & easy.

table cellpadding and cellspacing in stylesheet

P: n/a
On my webpage (http://www.classiccat.net/index.htm) I tried to transfer the
cellpadding/spacing attributes to my stylesheet. However, somehow it doesn't
work. I tried to look it up on the internet, but it seems to me that I am
doing everything right, which is obviously not the case.

It concerns the tables in the alphabetic part of the page. I have there a
table-class "block" defined. It works fine in giving the tables their
background-color. But somehow the padding and spacing have no effect.

Please give me feedback.

Thanks,

Wim
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,
Just to be complete:

The relevant code from the html page is:
<table BORDER=0 width=100% class=block><tr class=kop><td colspan=3>

The relevant code from the stylesheet is
table.block
{ background-color:#e3e3fa;
font-size: 84%;
border-spacing: 0px;
}

TABLE.block TD { padding : 0px; }

Wim

"Wim Roffal" <wi*************@nospamm-planet.nl> schreef in bericht
news:cd**********@reader10.wxs.nl...
On my webpage (http://www.classiccat.net/index.htm) I tried to transfer the cellpadding/spacing attributes to my stylesheet. However, somehow it doesn't work. I tried to look it up on the internet, but it seems to me that I am
doing everything right, which is obviously not the case.

It concerns the tables in the alphabetic part of the page. I have there a
table-class "block" defined. It works fine in giving the tables their
background-color. But somehow the padding and spacing have no effect.

Please give me feedback.

Thanks,

Wim

Jul 20 '05 #2

P: n/a
"Wim Roffal" <wi*************@nospamm-planet.nl> wrote:
border-spacing: 0px;


IE does not support the border-spacing property.

However, if you wish to set the spacing to zero, you can achieve the
effect by using
border-collapse: collapse;
which is fairly well supported.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3

P: n/a
Wim Roffal wrote:
On my webpage (http://www.classiccat.net/index.htm) I tried to
transfer the cellpadding/spacing attributes to my stylesheet.

Please give me feedback.


Consider reading the thread that is merely days old, on the very topic
if translating table presentation attributes into css.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4

P: n/a
Wim Roffal wrote:
The relevant code from the html page is:
<table BORDER=0 width=100% class=block><tr class=kop><td colspan=3>

The relevant code from the stylesheet is
table.block
{ background-color:#e3e3fa;
font-size: 84%;
border-spacing: 0px;
}


Quick answer: don't mix presentation html and css unless necessary. In
this case, you table needs only

<table cellspacing="0" class="block">

That will help with the spacing. Everything else that you want can be
done in css, which is probably the best place for it.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.