PDA

View Full Version : Cell borders


scooby
04-08-2004, 09:58 AM
Javascript:

I am working on an editor which allows you to create web pages without writing any html. It can create tables, add and delete rows and columns and either display or not display the tables borders. I would like to be able to also merge selected cells or just make it look like they are merged by not showing certain borders.

Is there any way to make 1 border of a cell not visible whilst the other 3 are still visible?

putts
04-08-2004, 10:02 AM
This is should prolly be in the client-side or page layout sections....but here's an answer either way :D


document.getElementById("cell3B").style.borderBottomWidth = 0;


Or, what I do for borders like that is I have a stylesheet with classes like....

.all
{ border:1px solid black }
.rt
{ border-right:1px solid black }
.ltTop
{ border-left:1px solid black; border-top:1px solid black }

and so on until you have all the possibilities, and then you can just assign the className attribute to whatever you want.

scooby
04-08-2004, 11:02 AM
Ok, thanks Putts, i appreciate your help.