A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/CSSNumericValue/div below:

CSSNumericValue: div() method - Web APIs

MDN Web Docs
  1. Web
  2. Web APIs
  3. CSSNumericValue
  4. div()

Filter sidebar

In this article
  1. CSSNumericValue
  2. Static methods
    1. parse()
  3. Instance methods
    1. add()
    2. div()
    3. equals()
    4. max()
    5. min()
    6. mul()
    7. sub()
    8. to()
    9. toSum()
    10. type()
  4. Inheritance
    1. CSSStyleValue
In this article CSSNumericValue: div() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The div() method of the CSSNumericValue interface divides the CSSNumericValue by the supplied value.

Syntax

js

div(number)
Parameters
number

Either a number or a CSSNumericValue.

Return value

A CSSMathProduct.

Exceptions
TypeError

Thrown if an invalid type was passed to the method.

Examples

js

let mathProduct = CSS.px("24").div(CSS.percent("4"));
// Prints "calc(24px / 4%)"
mathProduct.toString();
Specifications Specification CSS Typed OM Level 1
# dom-cssnumericvalue-div
Browser compatibility Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on Apr 7, 2023 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4