flipbooktutorialsdigital publishingonline tools

Embed Flipbook on Website: iFrame Code, Responsive Sizing, and Not Working Fixes

Paste one snippet and your flipbook sits inside any web page. This article shows the exact iframe code, the CSS that keeps it sharp on phones, tablets and desktops, and a troubleshooting checklist for blank frames, blocked embeds and cropped pages.

Embed Flipbook on Website: iFrame Code, Responsive Sizing, and Not Working Fixes
Cristian Da Conceicao

You built a beautiful flipbook, and now it sits on a separate link that your visitors have to click to reach. That is a missed chance. When you embed a flipbook on your website, readers flip through your catalog, menu or report without ever leaving the page, and your bounce rate, time on page and lead numbers all benefit. The catch is that a badly sized or blocked iframe turns into a blank rectangle fast. This article gives you the exact iframe code, the CSS that keeps the flipbook sharp on every screen, and a troubleshooting checklist for the most common failures. If you do not have a flipbook yet, you can create one in minutes with Flipbooks AI.

A shared link is fine for email. A website is different: visitors expect content to live inside your layout, under your branding, next to your calls to action.

A web designer's desk with an embedded flipbook visible on the laptop and HTML code on a second monitor

What You Gain

  • Longer visits. People stay on your page while they read, instead of bouncing to another tab.
  • Better context. Your headline, pricing and buy button sit right beside the publication.
  • One source of truth. Update the flipbook once and every page that embeds it shows the new version.
  • Cleaner SEO signals. Your page keeps the traffic, and the surrounding text can rank for your target terms.

When a Link Still Wins

Newsletters, social bios and QR codes work better with a direct link. Use both: embed on the page, share the link everywhere else.

ScenarioBest optionReason
Product pageEmbedKeeps shoppers next to the buy button
Email campaignDirect linkEmail clients block iframes
Social bioDirect linkNo place for code
Landing page for leadsEmbedForm and flipbook in one view
Printed QR codeDirect linkOpens instantly on a phone

The Basic iFrame Code

An iframe is a window inside your page that loads another page. Your flipbook host supplies the address, and you wrap it in a few attributes.

<iframe
  src="https://YOUR-FLIPBOOK-LINK"
  width="100%"
  height="600"
  style="border:0;"
  allowfullscreen
  loading="lazy"
  title="Spring product catalog">
</iframe>

What Each Attribute Does

AttributePurposeRecommended value
srcAddress of the flipbookYour share link, always starting with https
widthHorizontal size100% so it follows the container
heightVertical size500 to 700 pixels as a starting point
style="border:0;"Removes the default frame lineAlways
allowfullscreenLets readers expand the flipbookAlways
loading="lazy"Delays loading until scrolled nearYes, for anything below the fold
titleDescribes the frame for screen readersA short, specific phrase

💡 Pro tip: Never leave out the title attribute. It costs nothing, helps accessibility tools, and removes a common warning in site audits.

Fixed Size or Fluid Size?

A fixed width="800" looks perfect on your desktop and spills off the edge of a phone. Use 100% for width and control the maximum size with the wrapper you will see in the next section.

Make It Fit Every Screen

Responsive sizing is where most embeds fail. A flipbook is a book: it has an aspect ratio, and the frame must respect it.

Aerial view of a laptop, tablet and smartphone showing the same flipbook scaled to each screen

The Modern Aspect Ratio Method

Wrap the iframe in a container that holds a fixed ratio and stretches the frame to fill it.

<div style="position:relative;width:100%;max-width:1000px;margin:0 auto;aspect-ratio:16/10;">
  <iframe
    src="https://YOUR-FLIPBOOK-LINK"
    style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;"
    allowfullscreen
    loading="lazy"
    title="Spring product catalog">
  </iframe>
</div>

The container shrinks with the screen, and the height follows automatically. No media queries needed.

The Padding Fallback for Older Browsers

Very old browsers do not understand aspect-ratio. The classic padding trick works everywhere:

<div style="position:relative;width:100%;max-width:1000px;margin:0 auto;padding-bottom:62.5%;height:0;">
  <iframe
    src="https://YOUR-FLIPBOOK-LINK"
    style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;"
    allowfullscreen
    title="Spring product catalog">
  </iframe>
</div>

The number 62.5% equals a 16 by 10 ratio. Change it to match your publication.

Picking the Right Ratio

Flipbook typeSuggested ratioPadding value
Magazine or catalog spread16 by 1062.5%
Single page portrait view3 by 4133%
Widescreen presentation16 by 956.25%
Square lookbook1 by 1100%

Mobile Needs Extra Care

On a narrow phone, a two page spread becomes tiny. A good flipbook player switches to single page view on small screens, and a taller ratio helps it breathe. Use a small CSS rule to give phones more height:

<style>
  .flip-wrap { aspect-ratio: 16/10; }
  @media (max-width: 600px) { .flip-wrap { aspect-ratio: 3/4; } }
</style>

✅ Best practice: Always test the page on a real phone. A desktop browser resized to a narrow window does not reproduce touch scrolling, address bar changes or fullscreen behavior.

Hand holding a smartphone showing a flipbook that fits the narrow screen

How to Embed a Flipbook with Flipbooks AI

If your publication lives on Flipbooks AI, the whole process takes a few minutes. Here is the path from PDF to live page.

Marketer pointing at a website editor with a custom HTML block

Step by Step

  1. Create your account. Open Flipbooks AI and sign in or register.
  2. Upload your PDF. Drag the file into the dashboard. The PDF to Flipbook Converter turns each page into a turnable spread, keeping text sharp and links clickable.
  3. Customize the look. Add your logo, pick background colors, choose the page turn effect and drop in videos or audio where they help. There are no watermarks, so the result looks like your own brand.
  4. Open the sharing options. Copy the embed code, or the direct link if you prefer to write the iframe yourself.
  5. Set privacy. Turn on password protection for private material such as internal manuals or client proposals.
  6. Paste and publish. Drop the code into your site (see the next section) and check it on desktop and phone.

For a closer look at the process, visit the dedicated Embed Flipbook on Website tool page.

Features Worth Switching On

  • Analytics and lead generation on the Professional plan show which pages people read and capture emails before the flipbook opens. See the pricing plans for details.
  • Offline downloads let readers save the publication after viewing it on your page.
  • Mobile responsive design is built in, so the player adapts inside your frame.
  • Unlimited flipbooks on the Standard plan and above mean you can embed a different publication on every product or service page.

Where to Paste the Code

Every website platform handles raw HTML a little differently. Here is what to look for.

WordPress

Add a Custom HTML block, paste the wrapper and iframe, then preview. In the classic editor, switch to the Text tab first. Pasting into the Visual tab can strip the code.

Wix, Squarespace and Webflow

Use the platform's embed or code block. Choose the option labeled "Embed code" or "HTML", not the "Website address" option, because that one often forces its own fixed height.

Shopify

Edit the page or product template, add a Custom Liquid or Custom HTML section, and paste the snippet. Keep the wrapper so the frame does not overflow on the mobile theme.

Plain HTML Sites

Paste it directly where you want the flipbook to appear. Done.

PlatformBlock to useCommon catch
WordPressCustom HTMLVisual tab strips code
WixEmbed a Widget, HTML codeFixed height on the widget
SquarespaceCode blockNeeds a paid plan for scripts in some cases
ShopifyCustom LiquidTheme CSS may constrain width
WebflowEmbed elementCheck the parent container width

Boutique owner holding a tablet with a product catalog flipbook on her shop website

When the Embed Is Not Working

Something broke. Before you rewrite everything, walk through these causes, ordered from most to least common.

A frustrated woman looking at a laptop with a blank rectangle where the flipbook should be

Symptom Table

SymptomLikely causeFix
Blank white boxEditor stripped the iframeUse a Custom HTML block, not a text field
Gray box with a sad face iconBrowser blocked the frameCheck the console for security errors
"Refused to display" messageThe host page sends restrictive headersUse the official embed code, not a copied address bar URL
Mixed content warningYour site is https, the link is httpChange the link to https
Flipbook cut off at the bottomHeight too smallUse the aspect ratio wrapper
Double scrollbarsFixed height smaller than contentRemove scrolling="no" or increase height
Works on desktop, not on phoneFixed pixel widthSwitch to width:100%
Fullscreen button does nothingallowfullscreen missingAdd the attribute

Blocked by Security Headers

Some pages refuse to load inside frames. This is controlled by the X-Frame-Options header or the frame-ancestors rule in a Content Security Policy. If you copied the address from your browser instead of using the official embed link, you may be pointing at a page that was never meant to be framed. Go back to the share menu and copy the embed code itself.

The opposite problem happens on your own site. If your server sends a strict Content-Security-Policy, it may block frames from any domain you have not listed. Add the flipbook domain to your frame-src rule.

Content-Security-Policy: frame-src 'self' https://flipbooksai.com;

⚠️ Warning: Do not remove security headers across your whole site just to make one frame appear. Allow the single domain you need.

Mixed Content and Ad Blockers

Browsers refuse to show an http frame inside an https page. Open the developer console (F12) and look for a red "Mixed Content" message. Switch the src to https and refresh.

Some privacy extensions also hide frames that look like tracking widgets. Test in a private window with extensions off. If it works there, your code is fine and the issue is local to that browser.

The Page Builder Strips Your Code

Some editors clean HTML for safety. If your iframe vanishes after you save, check for these:

  • A rich text field instead of an HTML block.
  • A user role without permission to add unfiltered HTML.
  • A security plugin that removes iframes.

Ask the site admin to allow the flipbook domain, or add the code through the theme template.

Caching Confusion

You fixed the code and nothing changed. Clear the page cache, the CDN cache and your browser cache. Then reload with a hard refresh (Ctrl+Shift+R on Windows, Cmd+Shift+R on a Mac).

Two colleagues testing an embedded flipbook on a laptop at a standing desk

A Ten Point Pre-Launch Checklist

Run through this list before you announce the page.

  1. The src starts with https.
  2. Width is 100%, not a fixed pixel number.
  3. The wrapper keeps the correct aspect ratio.
  4. allowfullscreen is present.
  5. title describes the content.
  6. loading="lazy" is set for frames below the fold.
  7. The page loads in Chrome, Safari, Firefox and Edge.
  8. You tested on at least one real phone and one tablet.
  9. Password protection, if needed, is active and tested in a private window.
  10. Page speed is checked, since heavy frames can delay your layout.

💡 Speed tip: If the flipbook sits far down the page, lazy loading keeps the top of the page fast. If it is the main attraction, remove loading="lazy" so it starts right away.

Real World Examples

Concrete cases make the code easier to picture.

A Restaurant Menu

A bistro owner embeds a seasonal menu on the home page, right under the reservation button. When the menu changes, she swaps the PDF behind the same link and the site updates without touching the code. The Restaurant Menu Creator is built for exactly this workflow.

A restaurant owner at the bar reviewing the menu flipbook on the bistro website

A Product Catalog

A ceramics shop places its wholesale catalog on a gated page. Buyers enter an email, read the catalog in place, and the owner sees which pages get the most attention. Try the Digital Catalog Maker for the same setup.

A Quarterly Report

A small agency publishes its report on a client portal, protected by a password, with a download option for offline reading. See the Report Flipbook Creator.

Use caseWhere to embedSuggested ratioExtra feature
Restaurant menuHome page3 by 4Frequent updates
Product catalogShop landing page16 by 10Lead capture
Annual reportInvestor page16 by 10Download
PortfolioAbout page16 by 9Video clips
Training manualPrivate portal3 by 4Password

Measure What Happens After Embedding

Publishing is only half the job. Once the flipbook is live, watch how people use it.

Laptop screen showing simple analytics bars beside an embedded flipbook

Numbers Worth Watching

  • Views per page. Do people reach the section you care about?
  • Read time. A long average means the content holds attention.
  • Drop off page. If readers quit at page four, rework page four.
  • Leads captured. Compare form submissions with total views.

These reports come with the Professional plan, which also adds lead generation. Check the plans to see what fits your traffic.

Small Tweaks That Help

Move the flipbook higher on the page, shorten the introduction above it, and add a short line telling visitors to click the arrows or swipe. Small changes like these often lift reading rates noticeably.

Embed Your First Flipbook Today

You now have the iframe code, the responsive wrapper, the platform specific tips and a list of fixes for the most common failures. The fastest way to put it all to work is to publish something real.

  • Create your first flipbook on Flipbooks AI and copy the embed code.
  • Browse all flipbook tools to find the right template for your content.
  • Compare pricing plans when you are ready for analytics, lead generation and unlimited flipbooks.

Paste the code, test on a phone, and let your visitors read without leaving the page.

Share this article

Choose your language

FreeTurn any PDF into a flipbookFree, No Credit CardRealistic Page TurnsShare With One LinkCreate a Flipbook