4 ms·
I'll go ahead and promise to leave the '#wrapper' id on that element in my blog template, so this can be shortened to: document.getElementById('wrapper').sty
by Monadic-Cat 3y ago
I'll go ahead and promise to leave the '#wrapper' id on that element in my blog template, so this can be shortened to:
document.getElementById('wrapper').style.margin = '0 auto';
Though if you're in the habit of customizing sites you read, I'd personally recommend using a browser extension like Stylus (https://add0n.com/stylus.html https://add0n.com/stylus.html) to do CSS, so you could write it like this:
#wrapper {
margin: 0 auto;
}