Title: Max-Width &amp; Centered Inline Content
Last modified: January 6, 2017

---

# Max-Width & Centered Inline Content

 *  Resolved [bestewar](https://wordpress.org/support/users/bestewar/)
 * (@bestewar)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/max-width-centered-inline-content/)
 * I am trying to display inline-content in a Fancybox, centered, at 100% width/
   max-width 800px. I’ve (for the most part) achieved this by overriding the CSS
   with my own, but it’s still a bit buggy.
 * If you’ll notice on my page: [http://blmprinthouse.com/blm_revamp/about/](http://blmprinthouse.com/blm_revamp/about/)
   when you click a team thumbnail, the majority of the Fancyboxes display correctly
   centered, but here are the bugs: initially the boxes start on the left side of
   the screen and then jump to the middle. Also, randomly, some of the Fancyboxes
   stay left aligned. I can’t find a rhyme or reason to which boxes display centered
   and which don’t.
 * Is there a setting that automatically could take care of this for me? How about
   the Pro version? Any help is appreciated, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/max-width-centered-inline-content/#post-8627501)
 * Hi,
 * FancybBox was built so all sizing is handled by the script. Overriding this with
   style rules will mess with script calculations, making for the weird effects 
   you describe.
 * The max-width you are looking for, should be your inline content width. It will
   be a max width because on smaller screens, the script will reduce the window 
   size to fit the screen including a border and margin for the close button and
   light box effect. Window border and margin sizes can be adjusted on Settings 
   > Media.
 * Best to remove all custom styles that affect frame size and do something like
   this where your max-width is 780px — in this example allowing for another 10px
   border at each side, making 800px total width:
 *     ```
       <div id="chrisBio" style="width:780px">
       <h3>Chris Brooks</h3>
       ...
       </div>
       ```
   
 *  Thread Starter [bestewar](https://wordpress.org/support/users/bestewar/)
 * (@bestewar)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/max-width-centered-inline-content/#post-8627604)
 * Wow, that easy eh? I knew there had to be a simpler version than what I was doing!
   Thank you so much, works perfectly!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Max-Width & Centered Inline Content’ is closed to new replies.

 * ![](https://ps.w.org/easy-fancybox/assets/icon-256x256.png?rev=3188201)
 * [Firelight Lightbox](https://wordpress.org/plugins/easy-fancybox/)
 * [Support Threads](https://wordpress.org/support/plugin/easy-fancybox/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-fancybox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-fancybox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-fancybox/reviews/)

## Tags

 * [centered](https://wordpress.org/support/topic-tag/centered/)
 * [content](https://wordpress.org/support/topic-tag/content/)
 * [max-width](https://wordpress.org/support/topic-tag/max-width/)

 * 2 replies
 * 2 participants
 * Last reply from: [bestewar](https://wordpress.org/support/users/bestewar/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/max-width-centered-inline-content/#post-8627604)
 * Status: resolved