CSS question...

K

Kian

Hi there,

I would like to transfer my table's style to CSS. The table is as below...

< Table WIDTH="100%" CELLPADDING="4" CELLSPACING="0" BORDER="0">

Can somebody here show me how to use CELLSPACING style in CSS?

table.Outer
{
width: 100%; /*WIDTH="100%"*/
padding: 4;/*CELLPADDING="4"*/
???????? /*CELLSPACING="0"*/
border: 0;/*BORDER="0">*/
}

Thanks,
Kian


222
 
R

rf

Kian said:
Hi there,

I would like to transfer my table's style to CSS. The table is as below...

Moving to CSS usually implies abandoning tables for layout totally.
< Table WIDTH="100%" CELLPADDING="4" CELLSPACING="0" BORDER="0">

Can somebody here show me how to use CELLSPACING style in CSS?

If you really want to use tables then then

table
{
border-spacing: whatever;
....
}

is the CSS substitute for cellspacing, however this is not suported by IE.

Cheers
Richard.
 
S

Steve Pugh

Kian said:
I would like to transfer my table's style to CSS. The table is as below...

< Table WIDTH="100%" CELLPADDING="4" CELLSPACING="0" BORDER="0">

Can somebody here show me how to use CELLSPACING style in CSS?

table.Outer
{
width: 100%; /*WIDTH="100%"*/
padding: 4;/*CELLPADDING="4"*/
???????? /*CELLSPACING="0"*/
border: 0;/*BORDER="0">*/
}

table.Outer {
width: 100%;
border: none;
border-spacing: 0
border-collapse: collapse;
}

table.Outer td, table.Outer th {
padding: 4px;
}

The border-collapse shouln't be required, but IE doesn't support
border-spacing so a workaround is needed.

Steve
 

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
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top