开发者

Ignore previous css definitions

开发者 https://www.devze.com 2023-01-29 22:09 出处:网络
开发者_如何学编程I\'m developing an add-on for an existing CMS system. My add-on outputs a link to a style sheet and then outputs a table. The rest of the content(header,left column, footer etc.) is

开发者_如何学编程I'm developing an add-on for an existing CMS system. My add-on outputs a link to a style sheet and then outputs a table. The rest of the content(header,left column, footer etc.) is provided by the CMS.

Previously linked CSS styles seems to effect the way my table is displayed. I want to avoid this. I want my table to be shown according to my CSS style. How can I this?


You can add the !important declaration to your style:

table thead th
{
    color: #ff0000 !important;
}

Your column headings should have red text now, even if another color has been previously set through another style.


There are only two options:

1) Put the table and its stylesheet in an iframe. Since it is a separate webpage entirely, it won't be affected by stylesheets on the parent webpage.

2) Fully specify the styles of all elements on your table. As long as you override everything the parent page might have specified, your table will look as you want it to.


do you mean a CSS reset? google that for thousands of results.

0

精彩评论

暂无评论...
验证码 换一张
取 消