Style gridTemplateAreas Property
Example
Change the grid layout of an element to a two column layout where the first row is 250px high:
document.getElementById("myDIV").style.grid = "250px / auto auto";
Try it Yourself »
Definition and Usage
The grid property is a shorthand property for:
Browser Support
| Property | |||||
|---|---|---|---|---|---|
| grid | 61.0 | 79.0 | 36.0 | 14.0 | 48.0 |
Syntax
Return the grid property:
object.style.grid
Set the grid property:
object.style.grid = value
Property Values
| Value | Description |
|---|---|
| auto | Default. Allows a straight jump "scroll effect" between elements within the scrolling box. |
| smooth | Allows a smooth animated "scroll effect" between elements within the scrolling box. |
| initial | Sets this property to its default value. Read about initial |
| inherit | Inherits this property from its parent element. Read about inherit |
Related Pages
CSS reference: scroll-behavior property
❮ Style Object

