Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / Editor / CellPadding and CellSpacing do not apply in Design mode

CellPadding and CellSpacing do not apply in Design mode

Article Info

Rating: Not rated

Article information

Article relates to

 RadEditor for ASP.NET AJAX

Created by

 Rumen Zhekov


PROBLEM
CellPadding and CellSpacing do not apply in Design mode

DESCRIPTION
The user can apply cellpadding and cellspacing attributes to a table throught the Table Wizard or manually in HTML mode. The problem is that the table rendering will be not affected in Design mode of RadEditor - no matter these properties are set or not.

SOLUTION
The problem is due to that the cellpadding and cellspacing attributes gets overriden by the RadEditor styles, which are used to nicely format that tables and show the dashed table borders in Design mode:

table
{
   BORDER-RIGHT: #999999 1px dashed;
   border-bottom: #999999 1px dashed;
}
table td
{
   PADDING: 1px;
   border-top: #999999 1px dashed;
   BORDER-LEFT: #999999 1px dashed;
}
table th
{
   PADDING: 1px;
   border-top: #000000 1px dashed;
   BORDER-LEFT: #000000 1px dashed;
}

The padding css property overrides the cellpadding and cellspacing attributes.

To fix the problem set the ContentAreaCssFile property of RadEditor to point to your own css file and define your own table td and table th classes by skipping the padding property:

table
{
   BORDER-RIGHT: #999999 1px dashed;
   border-bottom: #999999 1px dashed;
}
table td
{
   border-top: #999999 1px dashed;
   BORDER-LEFT: #999999 1px dashed;
}
table th
{
   border-top: #000000 1px dashed;
   BORDER-LEFT: #000000 1px dashed;
}


You can find more information in this help article: Content Area Appearance Problems.

Comments

There are no comments yet.
If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.