document.ids.margins()
JavaScript 1.2+ Nav4+ Syntax
document.ids.idName.margins(top,right,bottom,left) document.ids.idName.margins(top-bottom,right-left) document.ids.idName.margins(all)
Description
The margins() method specifies the margin distance between border of an element and the border of adjacent elements. Dot notation is used to associate the property with the ID called idName. Setting margin widths is equivalent to setting the marginBottom, marginLeft, marginRight, and marginTop properties. Table 7.18 lists all the arguments associated with the margins() method.
Item | Description |
---|---|
top | Width of the top margin |
right | Width of the right margin |
left | Width of the left ... |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.