Barbie
Barbie

Reputation: 41

How to remove a CSS style completely and not replacing it?

I have a style given in the following way:

td,th{padding:0}

Now I want to completely remove this style dynamically and not override it with some value because I need the inline/default value set by the browser. Anyone having any idea how to do this, feel free to answer.

Upvotes: 4

Views: 134

Answers (2)

connexo
connexo

Reputation: 56754

In CSS 3, you might want to use

th,td { padding: unset; }

or

th,td { padding: initial; }

http://www.sitepoint.com/css3-inheritance-tips-tricks/

http://www.w3.org/TR/css-cascade-3/#inherit-initial

Upvotes: 3

steves165
steves165

Reputation: 104

Try making the value initial ie. Set the value to padding: initial

Upvotes: 2

Related Questions