Results 1 to 2 of 2

Thread: Main table border affects others?

  1. #1
    Join Date
    Dec 2005
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Main table border affects others?

    Helllo, I'm creating a page in Dreamweaver, using tables. I have a main table that other tables/content is being put into. I want to give ONLY the main table a 5px border - this is no bother to do, but the result is, that it adds a border to any other tables that are in there. I've checked my code, these tables have 0px as border value yet they still display one when previewed in browser.

    No doubt this is a simple fix, can someone tell me what I'm not checking? Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you add a border to a table, it is used by the table's cells as well. At least if you add it using the border attribute:

    <table border="5">

    However, if you add it using style:

    <table style="border:5px groove white;">

    Then it only applies to the outside of the table. If you are using the table selector in a style sheet:

    table {
    border:5px groove white;
    }

    That will affect all tables on the page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •