infogami wiki

share your infogami tips and tricks

Adding max-width to page bodies

I like to set a max-width on a page's body text to make it easier to read. There may be better ways to do this, but this is what I did:

In the site template, add a <div> inside the <td id="body">.

<div style="max-width: 40em; margin-left: auto; margin-right: auto;">

(The margin: auto bits are for centering.)

I tried putting it in a #body selector in the <style> in the <head>, but that didn't work for some reason.