-1

I am unable to add only outer body to HTML table in CKEDITOR. I have tried to remove inner border from advanced option in CKEDITOR but that is not working as well.

<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
  <tbody>
    <tr>
      <td border="0">&nbsp;</td>
      <td border="0">&nbsp;</td>
      <td border="0">&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
Minal Chauhan
  • 6,025
  • 8
  • 21
  • 41

2 Answers2

-1

Because you've set the border via HTML and that is the default behaviour. Better (in every case) set the border with CSS.

table {
  border: 1px solid #000;
}
<table cellpadding="1" cellspacing="1" style="width:500px">
  <tbody>
    <tr>
      <td border="0">&nbsp;</td>
      <td border="0">&nbsp;</td>
      <td border="0">&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>

You can also remove cellpadding and cellspacing by using some more CSS. For more informations see Set cellpadding and cellspacing in CSS?

Werner
  • 2,126
  • 2
  • 22
  • 34
-1

Try this. I have added this css:

table td {
  border: 0;
}
table {
  border: 1px solid #000;
}

table td {
  border: 0;
}
table {
  border:1px solid #000;
}
<table border="1" cellpadding="1" cellspacing="1" style="width:500px">
  <tbody>
    <tr>
      <td border="0">&nbsp;</td>
      <td border="0">&nbsp;</td>
      <td border="0">&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
Minal Chauhan
  • 6,025
  • 8
  • 21
  • 41
ankita patel
  • 4,201
  • 1
  • 13
  • 28