cellspacing css alternative (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


sljsh -> cellspacing css alternative (9/10/2003 17:26:57)

Hi. Is there a css alternative to the table element cellspacing?.

Thanks,

Lisa




c1sissy -> RE: cellspacing css alternative (9/11/2003 7:08:58)

Hi Lisa:
I don't know if this will help you out or not. I was also looking for the same solution myself, and decided to do a search on it.

http://www.w3.org/TR/REC-CSS2/tables.html

http://forums.devshed.com/t70164/s.html

I hope this helps you out until someone who really knows this comes along!




cosegirl -> RE: cellspacing css alternative (1/7/2005 16:15:29)

1) Try this: [works in mozilla, ns6, ie6 ]

/* Equivalent for cellspacing=0 */
table{
border-collapse: collapse;
}

/* Equivalent for cellspacing=5px */
/* Works in IE5+ */
--------------------
table{
border-collapse: collapse;
border-width: 5px;
}

/* Works in NN */
--------------------
table{
border-collapse: collapse;
border-spacing: 5px;
}

2) Detail about border-collapse:
http://www.blooberry.com/indexdot/css/properties/table/bcollapse.htm




d a v e -> RE: cellspacing css alternative (1/7/2005 18:02:01)

additionally... eric meyer says that because margins are not applied to table cells then you *can* use the css2 property border-spacing but support for this is pretty bad. he suggests leaving it in the html as a table attribute (i.e. <table cellspacing="0">)




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875