how to remove css property using javascript?


Tags: javascript,css

Problem :

is it possible to remove a CSS property of an element using JavaScript ? e.g. I have div.style.zoom = 1.2, now i want to remove the zoom property through JavaScript ?



Solution :

Typically You cannot remove properties from built-in objects like that, and certainly not in IE (the zoom attribute of the style object is a IE extension)

You can set it to the default value:

el.style.zoom = "";

the effective zoom will now be whatever follows from the definitions set in the stylesheets (through link and style tags)

So this syntax will only modify the local style of this element.


    CSS Howto..

    How to get CSS background property to work with toggleClass() in jQuery?

    How to change text color for link in tr element with CSS

    How can I change the color of my body when using Bootstrap?

    How to Generate All Possible CSS 2 Selector Combinations?

    How do I get my menu to drop down? CSS & HTML

    I have a simple image picture slider with JQuery, but I do not know how to animate up or down

    How to delay one transition but not the other?

    How to position one element relative to a separate element in CSS

    CSS: How to vertically align elements inside div with display: table-cell

    How to check image is visible (Webdriver)

    How to put a banner above the fixed navbar of bootstrap which disappears when scrolling down?

    How to create an email template from a responsive website?

    how to prevent transformation of text inherited from a skewed parent

    How to center an input tag in fieldset when using codeigniter?

    How to position heading (h1) placed on a background image and centered according to it outside of its container

    How to add my custom css class to a html element

    HTML - How to put text over a white background over a background image

    How to properly separate pages in jQuery Mobile?

    background image not showing on nested

    How can I add an image to a
  • tag dynamically
  • Adding buttons to slideshow

    How do I fix this simple CSS floating issue in IE?

    How to vertically center an element, that has a float, with CSS or JavaScript

    How to center images vertically these divs?

    How to create a list with three columns in a row by css and html?

    How can I style html/form elements using CSS?

    how to align all text on left side and image on right size

    How to hide one table and show another in nice animated way?

    CSS - How to align content to middle using bootstrap?

    How do I change the css gradient values when my progress bar value changes?