Wordpress-Table border issue

6 replies
  • WEB DESIGN
  • |
Hi,

I've used Headway theme for my site. When i insert the following code in the Live CSS , the table border style will be removed at all pages:
Code:
table tr, table td { border: none !important;  }
But if want the table border to be displayed at some specified pages, what must i do?
#border #issue #wordpresstable
  • Profile picture of the author Farish
    Originally Posted by baokhau View Post

    Hi,

    I've used Headway theme for my site. When i insert the following code in the Live CSS , the table border style will be removed at all pages:
    Code:
    table tr, table td { border: none !important;  }
    But if want the table border to be displayed at some specified pages, what must i do?
    That is because your code is in the CSS which is globally defining any table.

    If your wordpress theme allows html editing of each table, I would add a class or id to each table.

    Example

    Code:
    <table class ="noborder">
    then make a css code for that class.

    Code:
    .noborder 
    
    {
    border:none;
    }
    Lastly revert your CSS to what it was before and remove the !important.

    !important will override and you will be wondering why it isn't working.

    So for all the tables you want no border just add that class and then all the other tables will have the border.
    {{ DiscussionBoard.errors[8996688].message }}
  • Profile picture of the author baokhau
    @Farish,

    I follow your instruction but the contact form has unexpected lines although i set the table border="0".



    What's wrong?
    {{ DiscussionBoard.errors[8996736].message }}
  • Profile picture of the author Farish
    border =0 and none is the same.

    sorry my css should be

    Code:
    table.noborder
    
    {
    border:0;
    }
    {{ DiscussionBoard.errors[8996755].message }}
  • {{ DiscussionBoard.errors[8996763].message }}
  • Profile picture of the author Farish
    Did you do the same for tr and td?

    That is why your initial one was

    Code:
    table tr, table td { border: none !important;  }

    same concept here

    table.noborder td {
    border:0;
    }
    {{ DiscussionBoard.errors[8996792].message }}
  • {{ DiscussionBoard.errors[8996828].message }}

Trending Topics