Search code examples
csscss-tables

How to stop Table within a Table inheriting style of first table?


Ok first off I am not styling page with tables or anything like that, just want to get that out of the way, lol.

Basically I have a table that lists services, prices, and add to cart paypal buttons.

Everything works fine and looks great, except I am using two inline styles, that I would like to bring to an external style sheet instead.

The reason I am using the inline styles: One of the paypal buttons has a drop down option menu...that option menu is made from a . All the paypal buttons including the one with the option menu are inside of my main table, so the paypal with option button is creating a table within a table that is inheriting the styles set for my main table. The style is a border that goes around the option button.

The only way I can stop it, is by using inline styles.

I tried adding some CSS that sets the border to none:

.noborder {border:none;}

then add HTML class to the paypal td section: , but that does not work. Only inline style stops border like this:

Anyone know how to fix this?


Solution

  • Try your same css solution, but forcing the style with !important, like this:

    .noborder {border:none !important;}