Removing unwanted table cell borders with CSS

前端 未结 9 1045
灰色年华
灰色年华 2020-12-02 14:57

I have a peculiar and frustrating problem. For the simple markup:

相关标签:
9条回答
  • 2020-12-02 15:31

    After trying the above suggestions, the only thing that worked for me was changing the border attribute to "0" in the following sections of a child theme's style.css (do a "Find" operation to locate each one -- the following are just snippets):

    .comment-content table {
        border-bottom: 1px solid #ffffd;
    
    .comment-content td {
        border-top: 1px solid #ffffd;
        padding: 6px 10px 6px 0;
    }
    

    Thus looking like this afterwards:

    .comment-content table {
        border-bottom: 0;
    
    .comment-content td {
        border-top: 0;
        padding: 6px 10px 6px 0;
    }
    
    0 讨论(0)
  • 2020-12-02 15:32

    add some css:

    td, th {
       border:none;
    }
    
    0 讨论(0)
  • 2020-12-02 15:34

    Try assigning the style of border: 0px; border-collapse: collapse; to the table element.

    0 讨论(0)
  • 2020-12-02 15:41

    You may also want to add

    table td { border:0; }
    

    the above is equivalent to setting cellpadding="0"

    it gets rid of the padding automatically added to cells by browsers which may depend on doctype and/or any CSS used to reset default browser styles

    0 讨论(0)
  • 2020-12-02 15:44

    to remove the border , juste using css like this :

    td {
     border-style : hidden!important;
    }
    
    0 讨论(0)
  • 2020-12-02 15:44

    Set the cellspacing attribute of the table to 0.

    You can also use the CSS style, border-spacing: 0, but only if you don't need to support older versions of IE.

    0 讨论(0)
提交回复
热议问题