Html makes table borders invisible

I am using Drupal 6 with a summertime theme . I also use FCKeditor. To align the content, I wanted to create a table with invisible borders. First I tried the properties of the FCKEditor table, and I gave 0 the size of the border to make the borders invisible. But that did not work. I looked at the source, and the idle code was as below (why doesn't providing border = "0" work?):

<table width="468" cellspacing="0" cellpadding="0" border="0" style="width: 468px; height: 201px;">
    <tbody>
        <tr>
            <td>
            <h2 class="rtecenter"><a href="http://mydomain.com/url"><strong>Content </strong></a></h2>
            </td>
            <td><img src="/sites/mydomain.com/files/sample.jpg" alt="" /></td>
        </tr>
    </tbody>
</table> 

Then I tried:

<table width="468" cellspacing="0" cellpadding="0" style="border: medium hidden ; width: 468px; height: 201px;">

Table borders are now invisible, but cell borders are still visible. How can I make it completely invisible. Thank.

0
source share
4 answers

border , <td style="border: 0;">. , CSS, :

table td { border: 0; }

, .

+2

:

<table width="468" cellspacing="0" cellpadding="0" border="0" style="width: 468px; height: 201px;">
<tbody>
    <tr>
        <td style="border: 0">
        <h2 class="rtecenter"><a href="http://mydomain.com/url"><strong>Content </strong></a></h2>
        </td>
        <td style="border: 0"><img src="/sites/mydomain.com/files/sample.jpg" alt="" /></td>
    </tr>
</tbody>

+1

CSS . Drupal core system.css , .

CSS , CSS . .css .info.

:

tbody,
thead,
thead th,
tr.even,
tr.odd {
  border: 0;
}

CSS .

+1

, - . , , . - .

Instead of doing some of the things mentioned above, it would be easier to just add a specific ID or CLASS name to this table, then you can specify the parameters for this table only in CSS.

HTML:

<table .... id="exampleclass">

CSS

#exampleclass tbody,
#exampleclass thead, 
#exampleclass th { 
  border: 0; 
} 
+1
source

Source: https://habr.com/ru/post/1584000/


All Articles