In addition to other answers, if you want to use the dash notition for style properties, you can also use:
document.getElementById("xyz").style["padding-top"] = "10px";
More Related Contents:
- When we using alert vs popup div tag? [closed]
- 5 stars and the golden 5 stars are not together (When browsing with Internet explorer)
- How to make page loaders/animations/transitions
- Download the text over image using jquery
- How to autosize a textarea using Prototype?
- Textarea Auto height [duplicate]
- Can I force a link to open in a specific browser?
- Why write when the mime type is set by the server?
- How to make Internet Explorer emulate pointer-events:none?
- How to show popup message like in Stack Overflow
- Using jQuery how to get click coordinates on the target element
- Dropdown select with images
- flow 2 columns of text automatically with CSS
- CSS delivery optimization: How to defer css loading?
- Bootstrap v2 Dropdown Navigation not working on Mobile Browsers
- Scale element proportional to Background Cover with jQuery
- How to build simple tabs with jQuery?
- Bootstrap Dropdown with Hover
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Add CSS to with JavaScript?
- Images not loading when relative path is used in React
- how to get the base url in javascript
- Resize external website content to fit iFrame width
- How to show hidden divs on mouseover?
- Auto Mobile Site Redirect
- Google’s Imageless Buttons
- Is it possible to make input fields read-only through CSS?
- Freeze Header until Irrelevant (HTML, CSS and JS)
- How to apply background-color to a selected option?
- Bootstrap Dropdown menu is not working