Override a table border in a div when border = 1px?

Discussion in 'CSS' started by ian_batten, Mar 23, 2008.

  1. #1
    I'm adding a table to the siderbar in my BANS store, but the siderbar is currently set to add a border on the tables in the div. How can I override so I can create a table in this div, but make the new table have no border?

    Thanks in advance!
     
    ian_batten, Mar 23, 2008 IP
  2. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you have something like
    #sidebar table {
    set a border;
    }
    then you want to give your new table an id, and AFTER the declaration in your CSS for the sidebar's normal tables:
    #specialtable {
    border-collapse: collapse;
    }

    or border: none, if you had already set collapse earlier.

    You should put this AFTER the sidebar declaration because in CSS whatever comes later can have precedence. The #specialtable needs to be special-er than the other tables in the sidebar. Special-er things also get precedence.
     
    Stomme poes, Mar 23, 2008 IP