Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8260727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:09:43+00:00 2026-06-08T03:09:43+00:00

When using box-sizing: border-box, it causes the close button to be cut off. This

  • 0

When using box-sizing: border-box, it causes the “close” button to be cut off. This is especially the case when using Foundation 3 by Zurb.

The code that seems to cause issues for fancybox is this:

* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

Now, maybe the author needs to take border-box into consideration when doing the calcs, but I’d like to know if there’s an easy way to override the behavior with CSS.

Here’s a Fiddle that demonstrates what’s happening. You can see how the close button gets cut off. http://jsfiddle.net/jonthomas/SxZuR/4/

Also, here’s the issue on github: https://github.com/fancyapps/fancyBox/issues/311

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:09:44+00:00Added an answer on June 8, 2026 at 3:09 am

    The author of the plugin provided the CSS necessary to fix this. Use the following CSS to force fancybox and all of it’s child elements to use content-box for box-sizing.

    .fancybox-wrap, .fancybox-wrap * {
        box-sizing: content-box;
        -webkit-box-sizing: content-box;
        -moz-box-sizing: content-box;
    }​
    

    See it working here: http://jsfiddle.net/jonthomas/ut93u/2/

    He also mentions to make sure you have the latest code. I have 2.0.6 and the above code fixes the issue fine. However you can always grab the latest code here: https://github.com/fancyapps/fancyBox/zipball/master

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using box-sizing: border-box in CSS, I assume that the total width of an
I'm using the box-sizing:border-box model. When an inline-block element with a min-width is contained
I am using box-sizing with vendor prefixes, like this ...running it through the CSS
I'm trying to simulate rotating box using Newton Physics and OpenGL. This is what
Currently I'm using this box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset; but
I am adding a text box using javascript: This is what is generated: <dd
I have a fixed div setup using this: .box { position: fixed; width: 600px;
I'm using the following code to create a Dialog box using JQUERY/UI: var $dialog2
i want box-sizing: border-box for div tag. For Mozila Firefox i have tried -moz-box-sizing:
I have a textarea with the following style applied: textarea { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.