Results 1 to 5 of 5

Thread: how to add style for border for all tables border?

  1. #1
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how to add style for border for all tables border?

    I have code like: <table border="1" style="border-color:#EDECE6;" cellspacing="0" align="left">

    I woudl like to add colour tha same for all table border.
    Now is seen only on outside border.

    How to do it?

  2. #2
    Join Date
    May 2007
    Location
    Viet Nam
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    CSS:

    Code:
    table {
    border: #EDECE6 solid 1px;
    }
    remove the border="1" on HTML just use:
    Code:
    <table cellspacing="0" align="left"> 
    </table>

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by toplisek View Post
    I have code like: <table border="1" style="border-color:#EDECE6;" cellspacing="0" align="left">
    Remove the deprecated attributes border and align, and use only CSS instead.

    I woudl like to add colour tha same for all table border.
    Now is seen only on outside border.

    How to do it?
    Add borders to the table cells.
    Mike

  4. #4
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Spiritvn View Post
    CSS:

    Code:
    table {
    border: #EDECE6 solid 1px;
    }
    remove the border="1" on HTML just use:
    Code:
    <table cellspacing="0" align="left"> 
    </table>
    If I do this it will not show border any more. Is there some solution or wrong?

  5. #5
    Join Date
    May 2007
    Location
    Viet Nam
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by toplisek View Post
    If I do this it will not show border any more. Is there some solution or wrong?
    i had tested and it works -.-

    or u can try other way:

    Code:
    .border {
    border: #EDECE6 solid 1px;
    }
    Code:
    <table class="border" cellspacing="0" align="left"> 
    </table>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •