UNPKG

bootstrap-center-div-vertically-and-horizontally

Version:

Responsive Center div vertically and horizontally built with Bootstrap 5. To center div both vertically and horizontally use flexbox utilities. See the example.

17 lines (14 loc) 314 B
/* eslint-disable */ export function get(element) { return getComputedStyle(element); } export function set(element, obj) { for (const key in obj) { let val = obj[key]; if (typeof val === 'number') { val = `${val}px`; } element.style[key] = val; } return element; }