469,352 Members | 1,889 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

table cellpadding and cellspacing in stylesheet

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
4 29221
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
"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
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
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.

Similar topics

1 post views Thread by andrewkooi | last post: by
5 posts views Thread by cool2005 | last post: by
4 posts views Thread by Martin Eyles | last post: by
3 posts views Thread by lovely_angel_for_you | last post: by
9 posts views Thread by vozzek | last post: by
1 post views Thread by muneebkiani | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.